diff options
author | James Almer <jamrial@gmail.com> | 2016-10-02 12:57:39 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-10-04 21:19:58 -0300 |
commit | b33369b6128a7c99fa7fa4686712ce8b8b5fef05 (patch) | |
tree | 38b9e872e033031bf3a1db84bf55a32743463a14 | |
parent | 3cc9d6d3824f24df677437b891b66bf84eabc45b (diff) | |
download | ffmpeg-b33369b6128a7c99fa7fa4686712ce8b8b5fef05.tar.gz |
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@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavformat/matroskaenc.c | 2 | ||||
-rw-r--r-- | tests/fate/matroska.mak | 2 | ||||
-rw-r--r-- | tests/fate/wavpack.mak | 4 | ||||
-rw-r--r-- | tests/ref/fate/binsub-mksenc | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index c6a8dceb79..def8610c58 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 8e4a1e870c..36cc779bea 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 a825a02bc3..240f5ead94 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 128ca31e90..c47349718e 100644 --- a/tests/ref/fate/binsub-mksenc +++ b/tests/ref/fate/binsub-mksenc @@ -1 +1 @@ -37a212f8d56ad71e7466d5129f88e756 +2dad5f63688ec613a04e94c8d4d167db |