summaryrefslogtreecommitdiff
path: root/libavcodec/sunrast.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-01 15:43:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-01 15:43:29 +0100
commitffd100b111f4d494a9d70dae0efef0307eaf84d8 (patch)
treeea85fc5a2a9976982f18bd26b3d96ff352a402c6 /libavcodec/sunrast.c
parent7630e564caaef008ae255c3b63ac725131073b6f (diff)
parentc265b8bb7638546919465e3585441b1d40c4b13d (diff)
Merge commit 'c265b8bb7638546919465e3585441b1d40c4b13d'
* commit 'c265b8bb7638546919465e3585441b1d40c4b13d': tiff: stop using deprecated avcodec_set_dimensions targa: stop using deprecated avcodec_set_dimensions svq1dec: stop using deprecated avcodec_set_dimensions sunrast: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/sunrast.c libavcodec/targa.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sunrast.c')
-rw-r--r--libavcodec/sunrast.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index a373df7d35..d9918f48b9 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -61,10 +61,6 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "invalid (compression) type\n");
return AVERROR_INVALIDDATA;
}
- if (av_image_check_size(w, h, 0, avctx)) {
- av_log(avctx, AV_LOG_ERROR, "invalid image size\n");
- return AVERROR_INVALIDDATA;
- }
if (maptype == RMT_RAW) {
avpriv_request_sample(avctx, "Unknown colormap type");
return AVERROR_PATCHWELCOME;
@@ -100,8 +96,10 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
- if (w != avctx->width || h != avctx->height)
- avcodec_set_dimensions(avctx, w, h);
+ ret = ff_set_dimensions(avctx, w, h);
+ if (ret < 0)
+ return ret;
+
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;