Merge commit 'ec7063005ee67c0b4d4b83aa5118dd22ad1094e8'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 1 Nov 2013 13:09:17 +0000 (14:09 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 1 Nov 2013 13:09:17 +0000 (14:09 +0100)
* commit 'ec7063005ee67c0b4d4b83aa5118dd22ad1094e8':
  eatqi: stop using deprecated avcodec_set_dimensions
  eatgv: stop using deprecated avcodec_set_dimensions
  eatgq: stop using deprecated avcodec_set_dimensions
  eamad: stop using deprecated avcodec_set_dimensions

Conflicts:
libavcodec/eamad.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/eamad.c
libavcodec/eatgq.c
libavcodec/eatgv.c
libavcodec/eatqi.c

@@@ -257,22 -249,16 +257,21 @@@ static int decode_frame(AVCodecContext 
      calc_quant_matrix(s, buf[13]);
      buf += 16;
  
 +    if (width < 16 || height < 16) {
 +        av_log(avctx, AV_LOG_ERROR, "Dimensions too small\n");
 +        return AVERROR_INVALIDDATA;
 +    }
 +
      if (avctx->width != width || avctx->height != height) {
-         if ((ret = av_image_check_size(width, height, 0, avctx)) < 0)
+         av_frame_unref(&s->last_frame);
 +        if((width * height)/2048*7 > buf_end-buf)
 +            return AVERROR_INVALIDDATA;
+         if ((ret = ff_set_dimensions(avctx, width, height)) < 0)
              return ret;
-         avcodec_set_dimensions(avctx, width, height);
-         av_frame_unref(&s->last_frame);
      }
  
 -    if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) {
 -        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
 +    if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
          return ret;
 -    }
  
      if (inter && !s->last_frame.data[0]) {
          av_log(avctx, AV_LOG_WARNING, "Missing reference frame.\n");
Simple merge
Simple merge
@@@ -111,11 -111,14 +111,12 @@@ static int tqi_decode_frame(AVCodecCont
      tqi_calculate_qtable(s, buf[4]);
      buf += 8;
  
-     if (s->avctx->width!=s->width || s->avctx->height!=s->height)
-         avcodec_set_dimensions(s->avctx, s->width, s->height);
+     ret = ff_set_dimensions(s->avctx, s->width, s->height);
+     if (ret < 0)
+         return ret;
  
 -    if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
 -        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
 +    if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
          return ret;
 -    }
  
      av_fast_padded_malloc(&t->bitstream_buf, &t->bitstream_buf_size,
                            buf_end - buf);