1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

h264: Workaround invalid flag combinations of 8x8 inference.

Fixes Ticket555

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-10-15 15:32:34 +02:00
parent 1d0afec8fc
commit 2ed7e353bd
2 changed files with 4 additions and 4 deletions

View File

@ -2770,6 +2770,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
if(h->sps.frame_mbs_only_flag){
s->picture_structure= PICT_FRAME;
}else{
if(!h->sps.direct_8x8_inference_flag && slice_type == AV_PICTURE_TYPE_B){
av_log(h->s.avctx, AV_LOG_ERROR, "This stream was generated by a broken encoder, invalid 8x8 inference\n");
return -1;
}
if(get_bits1(&s->gb)) { //field_pic_flag
s->picture_structure= PICT_TOP_FIELD + get_bits1(&s->gb); //bottom_field_flag
} else {

View File

@ -408,10 +408,6 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
sps->mb_aff= 0;
sps->direct_8x8_inference_flag= get_bits1(&s->gb);
if(!sps->frame_mbs_only_flag && !sps->direct_8x8_inference_flag){
av_log(h->s.avctx, AV_LOG_ERROR, "This stream was generated by a broken encoder, invalid 8x8 inference\n");
goto fail;
}
#ifndef ALLOW_INTERLACE
if(sps->mb_aff)