diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-08 02:11:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-08 02:11:31 +0200 |
commit | 653cdf42ee90d11b96c364c7fe627072e33abf32 (patch) | |
tree | f4b484b0e164331d27e5156ce5087583a97b2131 /libavcodec | |
parent | 829e43017fa733479a72e6518bb9c1f0da441dc5 (diff) | |
parent | a9fc88ea93b2648e043a2bb863cfacabc8c3342d (diff) | |
download | ffmpeg-653cdf42ee90d11b96c364c7fe627072e33abf32.tar.gz |
Merge remote-tracking branch 'qatar/release/9' into release/1.1
* qatar/release/9:
Prepare for 9.10 RELEASE
h263dec: Remove a hack that can cause infinite loops
mpegvideo: Initialize chroma_*_shift and codec_tag even if the size is 0
vc1dec: Don't decode slices when the latest slice header failed to decode
Conflicts:
RELEASE
libavcodec/h263dec.c
libavcodec/mpegvideo.c
libavcodec/vc1dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h263dec.c | 11 | ||||
-rw-r--r-- | libavcodec/mpegvideo.c | 4 | ||||
-rw-r--r-- | libavcodec/vc1dec.c | 7 |
3 files changed, 8 insertions, 14 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 0232aa4c9d..24df411410 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -597,17 +597,6 @@ retry: /* FIXME: By the way H263 decoder is evolving it should have */ /* an H263EncContext */ - if ((!avctx->coded_width || !avctx->coded_height) && 0) { - ParseContext pc= s->parse_context; //FIXME move these demuxng hack to avformat - - s->parse_context.buffer=0; - ff_MPV_common_end(s); - s->parse_context= pc; - avcodec_set_dimensions(avctx, s->width, s->height); - - goto retry; - } - if (s->width != avctx->coded_width || s->height != avctx->coded_height || s->context_reinit) { diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index f9246f06c1..bcbda07891 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -888,7 +888,9 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) s->flags2 = s->avctx->flags2; /* set chroma shifts */ - avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &s->chroma_x_shift, &s->chroma_y_shift); + avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, + &s->chroma_x_shift, + &s->chroma_y_shift); /* convert fourcc to upper case */ s->codec_tag = avpriv_toupper4(s->avctx->codec_tag); diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 01d09efd62..270f91a5de 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5666,6 +5666,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, goto err; } } else { + int header_ret = 0; if (v->fcm == ILACE_FRAME && s->pict_type == AV_PICTURE_TYPE_B) goto err; // This codepath is still incomplete thus it is disabled @@ -5715,18 +5716,20 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, if (i) { v->pic_header_flag = 0; if (v->field_mode && i == n_slices1 + 2) { - if (ff_vc1_parse_frame_header_adv(v, &s->gb) < 0) { + if ((header_ret = ff_vc1_parse_frame_header_adv(v, &s->gb)) < 0) { av_log(v->s.avctx, AV_LOG_ERROR, "Field header damaged\n"); continue; } } else if (get_bits1(&s->gb)) { v->pic_header_flag = 1; - if (ff_vc1_parse_frame_header_adv(v, &s->gb) < 0) { + if ((header_ret = ff_vc1_parse_frame_header_adv(v, &s->gb)) < 0) { av_log(v->s.avctx, AV_LOG_ERROR, "Slice header damaged\n"); continue; } } } + if (header_ret < 0) + continue; s->start_mb_y = (i == 0) ? 0 : FFMAX(0, slices[i-1].mby_start % mb_height); if (!v->field_mode || v->second_field) s->end_mb_y = (i == n_slices ) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height); |