diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 15:43:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 15:43:29 +0100 |
commit | ffd100b111f4d494a9d70dae0efef0307eaf84d8 (patch) | |
tree | ea85fc5a2a9976982f18bd26b3d96ff352a402c6 | |
parent | 7630e564caaef008ae255c3b63ac725131073b6f (diff) | |
parent | c265b8bb7638546919465e3585441b1d40c4b13d (diff) | |
download | ffmpeg-ffd100b111f4d494a9d70dae0efef0307eaf84d8.tar.gz |
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>
-rw-r--r-- | libavcodec/sunrast.c | 10 | ||||
-rw-r--r-- | libavcodec/svq1dec.c | 5 | ||||
-rw-r--r-- | libavcodec/targa.c | 5 | ||||
-rw-r--r-- | libavcodec/tiff.c | 4 |
4 files changed, 12 insertions, 12 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; diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 6c8bfc4e48..d62524dcae 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -638,7 +638,10 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data, av_dlog(avctx, "Error in svq1_decode_frame_header %i\n", result); return result; } - avcodec_set_dimensions(avctx, s->width, s->height); + + result = ff_set_dimensions(avctx, s->width, s->height); + if (result < 0) + return result; if ((avctx->skip_frame >= AVDISCARD_NONREF && s->nonref) || (avctx->skip_frame >= AVDISCARD_NONKEY && diff --git a/libavcodec/targa.c b/libavcodec/targa.c index b3616c29d7..b0c9b55f33 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -173,10 +173,9 @@ static int decode_frame(AVCodecContext *avctx, return AVERROR_INVALIDDATA; } - if ((ret = av_image_check_size(w, h, 0, avctx)) < 0) + if ((ret = ff_set_dimensions(avctx, w, h)) < 0) return ret; - if (w != avctx->width || h != avctx->height) - avcodec_set_dimensions(avctx, w, h); + if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; p->pict_type = AV_PICTURE_TYPE_I; diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 2b100ede5e..cd209674ca 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -546,9 +546,9 @@ static int init_image(TiffContext *s, ThreadFrame *frame) return AVERROR_INVALIDDATA; } if (s->width != s->avctx->width || s->height != s->avctx->height) { - if ((ret = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0) + ret = ff_set_dimensions(s->avctx, s->width, s->height); + if (ret < 0) return ret; - avcodec_set_dimensions(s->avctx, s->width, s->height); } if ((ret = ff_thread_get_buffer(s->avctx, frame, 0)) < 0) return ret; |