|
|
|
@ -52,6 +52,7 @@ typedef struct Mpeg1Context { |
|
|
|
|
AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
|
|
|
|
|
int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
|
|
|
|
|
int closed_gop; ///< GOP is closed
|
|
|
|
|
int first_slice; |
|
|
|
|
int extradata_decoded; |
|
|
|
|
} Mpeg1Context; |
|
|
|
|
|
|
|
|
@ -2243,7 +2244,7 @@ static int decode_chunks(AVCodecContext *avctx, |
|
|
|
|
/* we have a complete image: we try to decompress it */ |
|
|
|
|
if (mpeg1_decode_picture(avctx, buf_ptr, input_size) < 0) |
|
|
|
|
s2->pict_type = 0; |
|
|
|
|
s2->first_slice = 1; |
|
|
|
|
s->first_slice = 1; |
|
|
|
|
last_code = PICTURE_START_CODE; |
|
|
|
|
} else { |
|
|
|
|
av_log(avctx, AV_LOG_ERROR, "ignoring pic after %X\n", last_code); |
|
|
|
@ -2353,9 +2354,9 @@ static int decode_chunks(AVCodecContext *avctx, |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (s2->first_slice) { |
|
|
|
|
if (s->first_slice) { |
|
|
|
|
skip_frame = 0; |
|
|
|
|
s2->first_slice = 0; |
|
|
|
|
s->first_slice = 0; |
|
|
|
|
if (mpeg_field_start(s2, buf, buf_size) < 0) |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|