On Fri, 15 Feb 2013 14:09:32 +0100, Janne Grunau <janne-li...@jannau.net> wrote:
> On 2013-01-08 15:37:22 +0100, Anton Khirnov wrote:
> > ---
> >  libavcodec/loco.c |   21 ++-------------------
> >  1 file changed, 2 insertions(+), 19 deletions(-)
> > 
> > diff --git a/libavcodec/loco.c b/libavcodec/loco.c
> > index d2b2e88..bc33f70 100644
> > --- a/libavcodec/loco.c
> > +++ b/libavcodec/loco.c
> > @@ -173,14 +173,10 @@ static int decode_frame(AVCodecContext *avctx,
> >      LOCOContext * const l = avctx->priv_data;
> >      const uint8_t *buf    = avpkt->data;
> >      int buf_size          = avpkt->size;
> > -    AVFrame * const p     = &l->pic;
> > +    AVFrame * const p     = data;
> >      int decoded, ret;
> >  
> > -    if (p->data[0])
> > -        avctx->release_buffer(avctx, p);
> > -
> > -    p->reference = 0;
> > -    if ((ret = ff_get_buffer(avctx, p)) < 0) {
> > +    if ((ret = ff_get_buffer(avctx, p, 0)) < 0) {
> >          av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
> >          return ret;
> >      }
> > @@ -233,7 +229,6 @@ static int decode_frame(AVCodecContext *avctx,
> >      }
> >  
> >      *got_frame      = 1;
> > -    *(AVFrame*)data = l->pic;
> >  
> >      return buf_size;
> >  }
> > @@ -291,24 +286,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
> >      return 0;
> >  }
> >  
> > -static av_cold int decode_end(AVCodecContext *avctx)
> > -{
> > -    LOCOContext * const l = avctx->priv_data;
> > -    AVFrame *pic = &l->pic;
> > -
> > -    if (pic->data[0])
> > -        avctx->release_buffer(avctx, pic);
> > -
> > -    return 0;
> > -}
> > -
> >  AVCodec ff_loco_decoder = {
> >      .name           = "loco",
> >      .type           = AVMEDIA_TYPE_VIDEO,
> >      .id             = AV_CODEC_ID_LOCO,
> >      .priv_data_size = sizeof(LOCOContext),
> >      .init           = decode_init,
> > -    .close          = decode_end,
> >      .decode         = decode_frame,
> >      .capabilities   = CODEC_CAP_DR1,
> >      .long_name      = NULL_IF_CONFIG_SMALL("LOCO"),
> 
> unused variable 'pic' in LOCOContext othwerwise ok
> 

Fixed locally.

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

Reply via email to