diff options
author | wm4 <wm4@nowhere> | 2016-03-01 22:03:45 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-01 22:03:45 +0100 |
commit | 4e53272376c546bac2e5c73f7ebfe456162d3663 (patch) | |
tree | ef4c240651e99bdd850ef3e027b39a9af24e95ed /common/msg.c | |
parent | e0944991973c04701c830647a3f943b43d546b20 (diff) | |
download | mpv-4e53272376c546bac2e5c73f7ebfe456162d3663.tar.bz2 mpv-4e53272376c546bac2e5c73f7ebfe456162d3663.tar.xz |
av_log: avoid partial lines
We want to add a prefix to the ffmpeg log message, so we called mp_msg
multiple times until now. But logging such partial lines is a race
condition, because there's only one internal mp_msg buffer, and no
external mp_msg locks.
Avoid this by building the message on a stack buffer.
I might make a mp_log-local partial line buffer, but even then av_log()
can be called from multiple threads, while targetting the same mp_log.
(Really, ffmpeg's log API needs to be fixed.)
Diffstat (limited to 'common/msg.c')
0 files changed, 0 insertions, 0 deletions