Merge commit '730bac7bab3c7dcd9fcb7c70f154e5f4cfaef9a7'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 17 Nov 2013 01:43:57 +0000 (02:43 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 17 Nov 2013 01:48:17 +0000 (02:48 +0100)
* commit '730bac7bab3c7dcd9fcb7c70f154e5f4cfaef9a7':
  mss4: use the AVFrame API properly.
  mss3: use the AVFrame API properly.
  mss2: use the AVFrame API properly.
  mss1: use the AVFrame API properly.

Conflicts:
libavcodec/mss1.c
libavcodec/mss2.c
libavcodec/mss3.c
libavcodec/mss4.c

See: 02fe531afefa7ac3fcc552f8e83461a4bfa7f868
See: ff1c13b133d548b3ce103f91999b6cc1bb7e65cc
See: 310bf283542ff81a9ec8fa7492fe7d625e80562f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/mss1.c
libavcodec/mss2.c
libavcodec/mss3.c
libavcodec/mss4.c

@@@ -146,16 -148,16 +146,16 @@@ static int mss1_decode_frame(AVCodecCon
      int pal_changed = 0;
      int ret;
  
 -    init_get_bits(&gb, buf, buf_size * 8);
 +    if ((ret = init_get_bits8(&gb, avpkt->data, avpkt->size)) < 0)
 +        return ret;
 +
      arith_init(&acoder, &gb);
  
-     if ((ret = ff_reget_buffer(avctx, &ctx->pic)) < 0)
 -    if ((ret = ff_reget_buffer(avctx, ctx->pic)) < 0) {
 -        av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
++    if ((ret = ff_reget_buffer(avctx, ctx->pic)) < 0)
          return ret;
 -    }
  
-     c->pal_pic    =  ctx->pic.data[0] + ctx->pic.linesize[0] * (avctx->height - 1);
-     c->pal_stride = -ctx->pic.linesize[0];
+     c->pal_pic    =  ctx->pic->data[0] + ctx->pic->linesize[0] * (avctx->height - 1);
+     c->pal_stride = -ctx->pic->linesize[0];
      c->keyframe   = !arith_get_bit(&acoder);
      if (c->keyframe) {
          c->corrupted = 0;
@@@ -840,6 -840,12 +840,7 @@@ static av_cold int mss2_decode_init(AVC
      avctx->pix_fmt = c->free_colours == 127 ? AV_PIX_FMT_RGB555
                                              : AV_PIX_FMT_RGB24;
  
 -    ctx->last_pic = av_frame_alloc();
 -    if (!ctx->last_pic) {
 -        mss2_decode_end(avctx);
 -        return AVERROR(ENOMEM);
 -    }
      return 0;
  }
  
Simple merge
Simple merge