aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-01 14:09:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-01 14:09:17 +0100
commitbf688d23b5ff63395e4acf46b5d7fd5e610aab96 (patch)
treeee2a25164d980386ac49455a96b0b1aa947955ec
parent4a356512676629b4a289ea33f2b39b5f151cfae3 (diff)
parentec7063005ee67c0b4d4b83aa5118dd22ad1094e8 (diff)
downloadffmpeg-bf688d23b5ff63395e4acf46b5d7fd5e610aab96.tar.gz
Merge commit 'ec7063005ee67c0b4d4b83aa5118dd22ad1094e8'
* 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>
-rw-r--r--libavcodec/eamad.c5
-rw-r--r--libavcodec/eatgq.c7
-rw-r--r--libavcodec/eatgv.c6
-rw-r--r--libavcodec/eatqi.c5
4 files changed, 11 insertions, 12 deletions
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 6d8291e514..9ef216fd69 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -263,12 +263,11 @@ static int decode_frame(AVCodecContext *avctx,
}
if (avctx->width != width || avctx->height != height) {
+ av_frame_unref(&s->last_frame);
if((width * height)/2048*7 > buf_end-buf)
return AVERROR_INVALIDDATA;
- if ((ret = av_image_check_size(width, height, 0, avctx)) < 0)
+ 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)
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index a24550b795..2950d055d7 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -219,9 +219,10 @@ static int tgq_decode_frame(AVCodecContext *avctx,
s->height = bytestream2_get_le16u(&s->gb);
}
- 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;
+
tgq_calculate_qtable(s, bytestream2_get_byteu(&s->gb));
bytestream2_skip(&s->gb, 3);
diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c
index bfdfb76b9b..6664cdb0f4 100644
--- a/libavcodec/eatgv.c
+++ b/libavcodec/eatgv.c
@@ -281,9 +281,10 @@ static int tgv_decode_frame(AVCodecContext *avctx,
s->width = AV_RL16(&buf[0]);
s->height = AV_RL16(&buf[2]);
if (s->avctx->width != s->width || s->avctx->height != s->height) {
- avcodec_set_dimensions(s->avctx, s->width, s->height);
av_freep(&s->frame_buffer);
av_frame_unref(&s->last_frame);
+ if ((ret = ff_set_dimensions(s->avctx, s->width, s->height)) < 0)
+ return ret;
}
pal_count = AV_RL16(&buf[6]);
@@ -294,9 +295,6 @@ static int tgv_decode_frame(AVCodecContext *avctx,
}
}
- if ((ret = av_image_check_size(s->width, s->height, 0, avctx)) < 0)
- return ret;
-
if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
return ret;
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 262deb1cdd..387456a933 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -111,8 +111,9 @@ static int tqi_decode_frame(AVCodecContext *avctx,
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)
return ret;