Commit 989a614b authored by Michael Bradshaw's avatar Michael Bradshaw Committed by Michael Niedermayer

libavformat/matroskaenc: omit segment UID for webm

SegmentUID is not a supported element in WebM. See:
http://www.webmproject.org/docs/container/#SegmentUIDReviewed-by: 's avatarDave Rice <dave@dericed.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5558ff3a
......@@ -1559,20 +1559,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment