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>
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user