[FFmpeg-cvslog] rawdec: use av_image_check_size
Peter Ross
git at videolan.org
Sun Nov 25 18:46:06 CET 2012
ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Sun Nov 25 13:20:00 2012 +1100| [2d954ccd84e6a3dd030325ef94afec67309b2eba] | committer: Michael Niedermayer
rawdec: use av_image_check_size
Signed-off-by: Peter Ross <pross at xvid.org>
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d954ccd84e6a3dd030325ef94afec67309b2eba
---
libavcodec/rawdec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 4d4bce9..f60f5e4 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -175,10 +175,8 @@ static int raw_decode(AVCodecContext *avctx,
frame->top_field_first = context->tff;
}
- if (avctx->width <= 0 || avctx->height <= 0) {
- av_log(avctx, AV_LOG_ERROR, "w/h is invalid\n");
- return AVERROR(EINVAL);
- }
+ if ((res = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
+ return res;
//2bpp and 4bpp raw in avi and mov (yes this is ugly ...)
if (context->buffer) {
More information about the ffmpeg-cvslog
mailing list