[FFmpeg-cvslog] avformt/matroskaenc: undo an accidental revert by commit 5d48e4ea
James Almer
git at videolan.org
Tue Jul 26 21:24:26 EEST 2016
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jul 26 15:22:32 2016 -0300| [be04c4aa0029bef68503c26428af7074befedda9] | committer: James Almer
avformt/matroskaenc: undo an accidental revert by commit 5d48e4ea
Commit 5d48e4eafa6c4559683892b8638d10508125f3cf accidentally reverted changes
made to matroskaenc by commit 989a614b707dcff8abdffe28dc24ec64a83b2837.
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be04c4aa0029bef68503c26428af7074befedda9
---
libavformat/matroskaenc.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 833e77d..3648d49 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1561,20 +1561,23 @@ static int mkv_write_header(AVFormatContext *s)
if ((tag = av_dict_get(s->metadata, "title", NULL, 0)))
put_ebml_string(pb, MATROSKA_ID_TITLE, tag->value);
if (!(s->flags & AVFMT_FLAG_BITEXACT)) {
- uint32_t segment_uid[4];
- AVLFG lfg;
-
- av_lfg_init(&lfg, av_get_random_seed());
-
- for (i = 0; i < 4; i++)
- segment_uid[i] = av_lfg_get(&lfg);
-
put_ebml_string(pb, MATROSKA_ID_MUXINGAPP, LIBAVFORMAT_IDENT);
if ((tag = av_dict_get(s->metadata, "encoding_tool", NULL, 0)))
put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, tag->value);
else
put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);
- put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16);
+
+ if (mkv->mode != MODE_WEBM) {
+ uint32_t segment_uid[4];
+ AVLFG lfg;
+
+ av_lfg_init(&lfg, av_get_random_seed());
+
+ for (i = 0; i < 4; i++)
+ segment_uid[i] = av_lfg_get(&lfg);
+
+ put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16);
+ }
} else {
const char *ident = "Lavf";
put_ebml_string(pb, MATROSKA_ID_MUXINGAPP , ident);
More information about the ffmpeg-cvslog
mailing list