mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-01 04:12:14 +00:00
avformat/matroskaenc: Don't write elements with their default value
This has happened when writing chapters: Both editions as well as chapters are by default not hidden and given that we don't support writing hidden chapters at all, we don't need to write said elements at all. The same goes for ChapterFlagEnabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
05039c1334
commit
f0d712d0f9
@ -1400,7 +1400,6 @@ static int mkv_write_chapters(AVFormatContext *s)
|
||||
editionentry = start_ebml_master(dyn_cp, MATROSKA_ID_EDITIONENTRY, 0);
|
||||
if (mkv->mode != MODE_WEBM) {
|
||||
put_ebml_uint(dyn_cp, MATROSKA_ID_EDITIONFLAGDEFAULT, 1);
|
||||
put_ebml_uint(dyn_cp, MATROSKA_ID_EDITIONFLAGHIDDEN , 0);
|
||||
}
|
||||
for (i = 0; i < s->nb_chapters; i++) {
|
||||
ebml_master chapteratom, chapterdisplay;
|
||||
@ -1420,10 +1419,6 @@ static int mkv_write_chapters(AVFormatContext *s)
|
||||
(uint32_t)c->id + (uint64_t)mkv->chapter_id_offset);
|
||||
put_ebml_uint(dyn_cp, MATROSKA_ID_CHAPTERTIMESTART, chapterstart);
|
||||
put_ebml_uint(dyn_cp, MATROSKA_ID_CHAPTERTIMEEND, chapterend);
|
||||
if (mkv->mode != MODE_WEBM) {
|
||||
put_ebml_uint(dyn_cp, MATROSKA_ID_CHAPTERFLAGHIDDEN , 0);
|
||||
put_ebml_uint(dyn_cp, MATROSKA_ID_CHAPTERFLAGENABLED, 1);
|
||||
}
|
||||
if ((t = av_dict_get(c->metadata, "title", NULL, 0))) {
|
||||
chapterdisplay = start_ebml_master(dyn_cp, MATROSKA_ID_CHAPTERDISPLAY, 0);
|
||||
put_ebml_string(dyn_cp, MATROSKA_ID_CHAPSTRING, t->value);
|
||||
|
Loading…
Reference in New Issue
Block a user