[FFmpeg-devel] [PATCH 1/2] mpeg12enc: always write closed gops for intra only outputs

Marton Balint cus at passwd.hu
Mon Mar 31 21:48:56 CEST 2014


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavcodec/mpeg12enc.c | 2 +-
 tests/ref/lavf/mxf_d10 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 5a7a612..f7f1986 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -350,7 +350,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
         put_bits(&s->pb, 1, 1);
         put_bits(&s->pb, 6, (uint32_t)((time_code / fps) % 60));
         put_bits(&s->pb, 6, (uint32_t)((time_code % fps)));
-        put_bits(&s->pb, 1, !!(s->flags & CODEC_FLAG_CLOSED_GOP));
+        put_bits(&s->pb, 1, !!(s->flags & CODEC_FLAG_CLOSED_GOP) || s->intra_only);
         put_bits(&s->pb, 1, 0);                     // broken link
     }
 }
diff --git a/tests/ref/lavf/mxf_d10 b/tests/ref/lavf/mxf_d10
index 8e08bdd..98c2f6f 100644
--- a/tests/ref/lavf/mxf_d10
+++ b/tests/ref/lavf/mxf_d10
@@ -1,3 +1,3 @@
-28cf73e6d35a8f7aba30c0ed2bd84924 *./tests/data/lavf/lavf.mxf_d10
+838b732d832dcf40b0eb9944bc6d8f55 *./tests/data/lavf/lavf.mxf_d10
 5330989 ./tests/data/lavf/lavf.mxf_d10
 ./tests/data/lavf/lavf.mxf_d10 CRC=0x6c74d488
-- 
1.8.4.5



More information about the ffmpeg-devel mailing list