diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-10-19 09:28:45 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-10-23 14:15:56 +0200 |
commit | 3fc08304322ce3ed0e4a71efde78ae5e0d5c910c (patch) | |
tree | 4bbe3ef3c1dbbda2b81cdc1e41928790ae94ec58 /libavcodec/mpeg12.c | |
parent | da22ba7df461c13bf0b0eabc953303803a285d91 (diff) | |
download | ffmpeg-3fc08304322ce3ed0e4a71efde78ae5e0d5c910c.tar.gz |
mpeg12: move closed_gop from MpegEncContext to Mpeg1Context
It's MPEG-1/2 specific.
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 63b6066f32..6fb175e626 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -2111,7 +2111,7 @@ static void mpeg_decode_gop(AVCodecContext *avctx, time_code_seconds = get_bits(&s->gb, 6); time_code_pictures = get_bits(&s->gb, 6); - s->closed_gop = get_bits1(&s->gb); + s1->closed_gop = get_bits1(&s->gb); /*broken_link indicate that after editing the reference frames of the first B-Frames after GOP I-Frame are missing (open gop)*/ @@ -2120,7 +2120,7 @@ static void mpeg_decode_gop(AVCodecContext *avctx, if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_DEBUG, "GOP (%2d:%02d:%02d.[%02d]) closed_gop=%d broken_link=%d\n", time_code_hours, time_code_minutes, time_code_seconds, - time_code_pictures, s->closed_gop, broken_link); + time_code_pictures, s1->closed_gop, broken_link); } /** * Find the end of the current frame in the bitstream. @@ -2383,7 +2383,7 @@ static int decode_chunks(AVCodecContext *avctx, if (s2->last_picture_ptr == NULL) { /* Skip B-frames if we do not have reference frames and gop is not closed */ if (s2->pict_type == AV_PICTURE_TYPE_B) { - if (!s2->closed_gop) + if (!s->closed_gop) break; } } @@ -2467,6 +2467,7 @@ static void flush(AVCodecContext *avctx) Mpeg1Context *s = avctx->priv_data; s->sync=0; + s->closed_gop = 0; ff_mpeg_flush(avctx); } |