On 2013-01-08 15:37:25 +0100, Anton Khirnov wrote:
> ---
>  libavcodec/tiertexseqv.c |   14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c
> index a9064ec..5d5d694 100644
> --- a/libavcodec/tiertexseqv.c
> +++ b/libavcodec/tiertexseqv.c
> @@ -27,6 +27,7 @@
>  #include "avcodec.h"
>  #define BITSTREAM_READER_LE
>  #include "get_bits.h"
> +#include "internal.h"
>  
>  
>  typedef struct SeqVideoContext {
> @@ -227,21 +228,21 @@ static int seqvideo_decode_frame(AVCodecContext *avctx,
>  {
>      const uint8_t *buf = avpkt->data;
>      int buf_size = avpkt->size;
> +    int ret;
>  
>      SeqVideoContext *seq = avctx->priv_data;
>  
> -    seq->frame.reference = 1;
> -    seq->frame.buffer_hints = FF_BUFFER_HINTS_VALID | 
> FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
> -    if (avctx->reget_buffer(avctx, &seq->frame)) {
> +    if ((ret = ff_reget_buffer(avctx, &seq->frame)) < 0) {
>          av_log(seq->avctx, AV_LOG_ERROR, "tiertexseqvideo: reget_buffer() 
> failed\n");
> -        return -1;
> +        return ret;
>      }
>  
>      if (seqvideo_decode(seq, buf, buf_size))
>          return AVERROR_INVALIDDATA;
>  
> +    if ((ret = av_frame_ref(data, &seq->frame)) < 0)
> +        return ret;
>      *got_frame       = 1;
> -    *(AVFrame *)data = seq->frame;
>  
>      return buf_size;
>  }
> @@ -250,8 +251,7 @@ static av_cold int seqvideo_decode_end(AVCodecContext 
> *avctx)
>  {
>      SeqVideoContext *seq = avctx->priv_data;
>  
> -    if (seq->frame.data[0])
> -        avctx->release_buffer(avctx, &seq->frame);
> +    av_frame_unref(&seq->frame);
>  
>      return 0;
>  }

ok

Janne
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to