[FFmpeg-devel] pthread: fixed thread initialization with default buffer allocator

Wasserman Anatoliy anatoliy.wasserman at yandex.ua
Wed Dec 7 23:43:11 CET 2011


Hi

1. pthread.c:update_context_from_user
'thread_safe_callbacks' field was not propagated to the main context --> in ffplay buffer allocation always happened in main thread

2. pthread.c:frame_worker_thread
early 'ff_thread_finish_setup' happened only if codec doesn't provide 'update_thread_context' and defines 'thread_safe_callbacks', however check for 'avcodec_default_get_buffer' was left out.

3. pthead.c:ff_thread_get_buffer
sanity check again checks only for 'update_thread_context' and 'thread_safe_callbacks' but not 'avcodec_default_get_buffer'.

4. libopenjpegdec.c:libopenjpeg_decode_frame
with the fixes above call for 'ff_thread_finish_setup' is redundant and not needed.

Anatoliy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pthread-fixed-thread-initialization-issues-related-t.patch
Type: application/octet-stream
Size: 2293 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111207/ed1f7952/attachment.obj>


More information about the ffmpeg-devel mailing list