diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-30 22:13:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-30 22:14:25 +0200 |
commit | 2a227fe8799e26fe3c8862438a163f72dca017a5 (patch) | |
tree | 0d35c90d18c9806bc2f78d8d90b18e75324b2b2e /libavcodec | |
parent | 5585da7c5e47810b8433f54bea5ff947251b3055 (diff) | |
parent | 0a49a62f998747cfa564d98d36a459fe70d3299b (diff) | |
download | ffmpeg-2a227fe8799e26fe3c8862438a163f72dca017a5.tar.gz |
Merge commit '0a49a62f998747cfa564d98d36a459fe70d3299b'
* commit '0a49a62f998747cfa564d98d36a459fe70d3299b':
h263: Always check both dimensions
Conflicts:
libavcodec/ituh263dec.c
See: 62006b539ddda23594febf0fcb2f21c03de60457
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ituh263dec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index f7b84da180..2e449f8eeb 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -31,6 +31,7 @@ #include <limits.h> #include "libavutil/attributes.h" +#include "libavutil/imgutils.h" #include "libavutil/internal.h" #include "libavutil/mathematics.h" #include "avcodec.h" @@ -874,7 +875,7 @@ end: /* most is hardcoded. should extend to handle all h263 streams */ int ff_h263_decode_picture_header(MpegEncContext *s) { - int format, width, height, i; + int format, width, height, i, ret; uint32_t startcode; align_get_bits(&s->gb); @@ -1084,10 +1085,9 @@ int ff_h263_decode_picture_header(MpegEncContext *s) s->qscale = get_bits(&s->gb, 5); } - if (s->width == 0 || s->height == 0) { - av_log(s->avctx, AV_LOG_ERROR, "dimensions 0\n"); - return -1; - } + if ((ret = av_image_check_size(s->width, s->height, 0, s)) < 0) + return ret; + s->mb_width = (s->width + 15) / 16; s->mb_height = (s->height + 15) / 16; s->mb_num = s->mb_width * s->mb_height; |