[FFmpeg-devel] Improved comment for thread_safe_callbacks

Michael Niedermayer michaelni at gmx.at
Sun Apr 15 10:03:21 CEST 2012


On Sat, Apr 14, 2012 at 08:36:48PM +0200, Robert Nagy wrote:
> 

>  avcodec.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 00cecfe146c1d9bf391da00286c446312a67b791  0002-Improved-comment-for-thread_safe_callbacks-to-avoid-.patch
> From f2eedd1784be265290c63cd3c24e06364a6052d8 Mon Sep 17 00:00:00 2001
> From: Robert Nagy <ronag89 at gmail.com>
> Date: Sat, 14 Apr 2012 20:35:40 +0200
> Subject: [PATCH 2/2] Improved comment for thread_safe_callbacks to avoid
>  misinterpretation.
> 
> ---
>  libavcodec/avcodec.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index d905a01..c36e212 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -2689,7 +2689,7 @@ typedef struct AVCodecContext {
>  
>      /**
>       * Set by the client if its custom get_buffer() callback can be called
> -     * from another thread, which allows faster multithreaded decoding.
> +     * synchronously from another thread, which allows faster multithreaded decoding.

after reading this again, i think its still a bit ambigous.
the get_buffer call is protected by a mutex so there can be no 2
calls at the same time but they can happen at any time relative to the
main thread, they arent limited to happen when some function like
decode_video() is called. This may actually require the user
application to be carefull if the buffer pool can get accessed by
some other means

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/20120415/3fd3970c/attachment.asc>


More information about the ffmpeg-devel mailing list