[FFmpeg-devel] [PATCH] Add frame buffer allocators

Michael Niedermayer michaelni
Tue Mar 3 15:34:10 CET 2009


On Tue, Mar 03, 2009 at 01:24:38PM +0100, Gwenole Beauchesne wrote:
> Hi,
>
> This patch simplifies frame buffer allocation in mpegvideo.c. This is in 
> preparation for the upcoming hwaccel_data_private patch.
>
> Regards,
> Gwenole

> commit d91d5e838c5bfe4048acea7498194c18c37c0e06
> Author: Gwenole Beauchesne <gbeauchesne at splitted-desktop.com>
> Date:   Tue Mar 3 11:46:45 2009 +0000
> 
>     Add alloc_frame_buffer() / free_frame_buffer() to simplify calls to AVCodecContext::get_buffer() and prepare for HW accelerator private data management.
> 

> diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
> index 39ca2c8..0e634ed 100644
> --- a/libavcodec/mpegvideo.c
> +++ b/libavcodec/mpegvideo.c
> @@ -166,6 +166,43 @@ void ff_copy_picture(Picture *dst, Picture *src){
>  }
>  
>  /**
> + * Releases a frame buffer
> + */
> +static inline void free_frame_buffer(MpegEncContext *s, Picture *pic)
> +{
> +    s->avctx->release_buffer(s->avctx, (AVFrame*)pic);
> +}

this should not be inline, except that patch ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090303/479058e5/attachment.pgp>



More information about the ffmpeg-devel mailing list