[FFmpeg-devel] [PATCH] pthread_frame: save the FF_DEBUG_THREADS option in FrameThreadContext.
wtc at google.com
Sun Jul 9 00:28:48 EEST 2017
On Sat, Jul 8, 2017 at 6:19 AM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> On Fri, Jul 7, 2017 at 5:02 PM, Wan-Teh Chang <wtc-at-google.com at ffmpeg.org>
>> @@ -763,6 +764,7 @@ int ff_frame_thread_init(AVCodecContext *avctx)
>> fctx->async_lock = 1;
>> fctx->delaying = 1;
>> + fctx->debug_threads = (avctx->debug & FF_DEBUG_THREADS) != 0;
> Shouldn't this be done in update_context_from_user()?
This patch differs from the approach you outlined at the end of
* The debug_threads field is added to FrameThreadContext and applies to
all the decoding threads owned by the FrameThreadContext.
* The debug_threads field is set when avcodec_open2() is called, and
never changes thereafter.
In this design, we just need to set fctx->debug_threads in
ff_frame_thread_init() (which is called by avcodec_open2()).
More information about the ffmpeg-devel