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

Michael Niedermayer michaelni at gmx.at
Thu Dec 8 02:34:08 CET 2011


On Wed, Dec 07, 2011 at 02:43:11PM -0800, Wasserman Anatoliy wrote:
> 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

>  libopenjpegdec.c |    2 --
>  pthread.c        |    7 +++++--
>  2 files changed, 5 insertions(+), 4 deletions(-)
> dc20014a2abcafd1e4a52dce1109a88c9a748be7  0001-pthread-fixed-thread-initialization-issues-related-t.patch
> From ec74e25f418d558aee6348c7abf3ec2480ad08c1 Mon Sep 17 00:00:00 2001
> From: Anatoliy Wasserman <anatoliy.wasserman at yandex.ru>
> Date: Wed, 7 Dec 2011 14:14:49 -0800
> Subject: [PATCH] pthread: fixed thread initialization issues related to
>  thread-safe buffer allocator

tabs removed and applied
Thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111208/2a229f01/attachment.asc>


More information about the ffmpeg-devel mailing list