[FFmpeg-devel] [PATCH] avformat/matroskaenc: Write duration early during mkv_write_header
Soft Works
softworkz at hotmail.com
Mon Jul 18 23:31:03 EEST 2016
Hendrik and Michael,
thanks for looking into my patch!
>> if (!strcmp(s->oformat->name, "webm"))
>> mkv->mode = MODE_WEBM;
>> @@ -1594,6 +1620,18 @@ static int mkv_write_header(AVFormatContext *s)
>> mkv->duration_offset = avio_tell(pb);
>> if (!mkv->is_live) {
>> put_ebml_void(pb, 11); // assumes double-precision float to be written
>
>The void element here is to reserve space for the duration. If you're
>actually writing a duration here, it makes no sense to keep the void
>element.
>Then you could also remove the change in write_trailer.
I incorrectly assumed that put_ebml_void would zero out the data without advancing.
> breaks fate
i'm running fate now and will submit a revised patch.
Thanks very much,
softworkz
More information about the ffmpeg-devel
mailing list