[FFmpeg-devel] [PATCH] c93: Do not needlessly use reget_buffer.

Michael Niedermayer michaelni at gmx.at
Sat Nov 5 17:41:29 CET 2011


On Sat, Nov 05, 2011 at 04:19:27PM +0100, Reimar Döffinger wrote:
> get_buffer and release_buffer is more suitable for how this codec works
> and can result in better performance in some playback situations.
> 
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> ---
>  libavcodec/c93.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/libavcodec/c93.c b/libavcodec/c93.c
> index 1f4ed1f..2a36ed9 100644
> --- a/libavcodec/c93.c
> +++ b/libavcodec/c93.c
> @@ -130,10 +130,13 @@ static int decode_frame(AVCodecContext *avctx, void *data,
>  
>      c93->currentpic ^= 1;
>  
> +    if (newpic->data[0])
> +        avctx->release_buffer(avctx, newpic);
> +
>      newpic->reference = 1;
>      newpic->buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE |
>                           FF_BUFFER_HINTS_REUSABLE | FF_BUFFER_HINTS_READABLE;
> -    if (avctx->reget_buffer(avctx, newpic)) {
> +    if (avctx->get_buffer(avctx, newpic)) {

the buffer hints above look reget specific

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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- 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/20111105/d7f8b60d/attachment.asc>


More information about the ffmpeg-devel mailing list