[FFmpeg-devel] [PATCH] pthread_frame: save the FF_DEBUG_THREADS option in FrameThreadContext.
Ronald S. Bultje
rsbultje at gmail.com
Sat Jul 8 16:18:51 EEST 2017
Hi,
On Fri, Jul 7, 2017 at 5:31 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> Hi,
>
> On Fri, Jul 7, 2017 at 5:30 PM, Wan-Teh Chang <
> wtc-at-google.com at ffmpeg.org> wrote:
>
>> Note: I suspect we can simply delete the following line from
>> update_context_from_user() in libavcodec/pthread_frame.c:
>>
>> dst->debug = src->debug;
>>
>> That also fixes the tsan warning, but it'll take more time to
>> investigate whether it is necessary to update the |debug| field from
>> the user's AVCodecContext (src).
>>
>> That line in update_context_from_user() was added in the initial
>> commit of libavcodec/pthread.c:
>>
>> http://git.videolan.org/?p=ffmpeg.git;a=commit;h=37b00b47cbe
>> ecd66bb34c5c7c534d016d6e8da24
>>
>> Does any user actually modify avctx->debug after the avcodec_open2() call?
>
>
> To sync values of debug between worker threads if the user dynamically
> toggles bits in this flag.
>
Hm, I misread your question yesterday, sorry about that. Yes, users can
dynamically toggle this flag. Whether they do is a good question, but we'd
typically consider it a regression if this breaks. Since it's not hard to
keep it working, I'd prefer to keep it working.
Ronald
More information about the ffmpeg-devel
mailing list