[FFmpeg-cvslog] avformat/matroskaenc: don' t reserve space for stream duration tags if the output is not seekable

James Almer git at videolan.org
Wed Oct 5 03:23:21 EEST 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Oct  2 12:57:39 2016 -0300| [b33369b6128a7c99fa7fa4686712ce8b8b5fef05] | committer: James Almer

avformat/matroskaenc: don't reserve space for stream duration tags if the output is not seekable

The durations are never written in that situation.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b33369b6128a7c99fa7fa4686712ce8b8b5fef05
---

 libavformat/matroskaenc.c    | 2 +-
 tests/fate/matroska.mak      | 2 +-
 tests/fate/wavpack.mak       | 4 ++--
 tests/ref/fate/binsub-mksenc | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index c6a8dce..def8610 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1377,7 +1377,7 @@ static int mkv_write_tags(AVFormatContext *s)
         if (ret < 0) return ret;
     }
 
-    if (!mkv->is_live) {
+    if (s->pb->seekable && !mkv->is_live) {
         for (i = 0; i < s->nb_streams; i++) {
             ebml_master tag_target;
             ebml_master tag;
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 8e4a1e8..36cc779 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -4,6 +4,6 @@
 FATE_MATROSKA-$(call DEMMUX, MATROSKA, MATROSKA) += fate-matroska-remux
 fate-matroska-remux: CMD = md5 -i $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-2pass-akiyo.webm -color_trc 4 -c:v copy -fflags +bitexact -strict -2 -f matroska
 fate-matroska-remux: CMP = oneline
-fate-matroska-remux: REF = f08b20b90f158a4de5a02a52c25596b9
+fate-matroska-remux: REF = 1040692ffdfee2428954af79a7d5d155
 
 FATE_SAMPLES_AVCONV += $(FATE_MATROSKA-yes)
diff --git a/tests/fate/wavpack.mak b/tests/fate/wavpack.mak
index a825a02..240f5ea 100644
--- a/tests/fate/wavpack.mak
+++ b/tests/fate/wavpack.mak
@@ -91,12 +91,12 @@ fate-wavpack-matroskamode: CMD = md5 -i $(TARGET_SAMPLES)/wavpack/special/matros
 FATE_WAVPACK-$(call DEMMUX, WV, MATROSKA) += fate-wavpack-matroska_mux-mono
 fate-wavpack-matroska_mux-mono: CMD = md5 -i $(TARGET_SAMPLES)/wavpack/num_channels/mono_16bit_int.wv -c copy -fflags +bitexact -f matroska
 fate-wavpack-matroska_mux-mono: CMP = oneline
-fate-wavpack-matroska_mux-mono: REF = 4befcc41dab6c690a15d0c396c324468
+fate-wavpack-matroska_mux-mono: REF = a2987e2e51e01a35e47e7da13eb47a35
 
 FATE_WAVPACK-$(call DEMMUX, WV, MATROSKA) += fate-wavpack-matroska_mux-61
 fate-wavpack-matroska_mux-61: CMD = md5 -i $(TARGET_SAMPLES)/wavpack/num_channels/eva_2.22_6.1_16bit-partial.wv -c copy -fflags +bitexact -f matroska
 fate-wavpack-matroska_mux-61: CMP = oneline
-fate-wavpack-matroska_mux-61: REF = 7fedbfc3b9ea7348761db664626c29f4
+fate-wavpack-matroska_mux-61: REF = ffba4ddea1ba71f7a5901d9ed1a267be
 
 FATE_SAMPLES_AVCONV += $(FATE_WAVPACK-yes)
 fate-wavpack: $(FATE_WAVPACK-yes)
diff --git a/tests/ref/fate/binsub-mksenc b/tests/ref/fate/binsub-mksenc
index 128ca31..c473497 100644
--- a/tests/ref/fate/binsub-mksenc
+++ b/tests/ref/fate/binsub-mksenc
@@ -1 +1 @@
-37a212f8d56ad71e7466d5129f88e756
+2dad5f63688ec613a04e94c8d4d167db



More information about the ffmpeg-cvslog mailing list