[FFmpeg-devel] [PATCH 2/3] lavf/matroskaenc: skip writing "duration" tags

Rodger Combs rodger.combs at gmail.com
Tue Sep 6 23:57:09 EEST 2016


> On Sep 6, 2016, at 05:10, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 
> 2016-09-06 5:26 GMT+02:00 Rodger Combs <rodger.combs at gmail.com>:
>> ---
>> libavformat/matroskaenc.c | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
>> index decb66d..7deccaa 100644
>> --- a/libavformat/matroskaenc.c
>> +++ b/libavformat/matroskaenc.c
>> @@ -1314,6 +1314,7 @@ static int mkv_check_tag_name(const char *name, unsigned int elementid)
>>            av_strcasecmp(name, "stereo_mode") &&
>>            av_strcasecmp(name, "creation_time") &&
>>            av_strcasecmp(name, "encoding_tool") &&
>> +           av_strcasecmp(name, "duration") &&
> 
> Could you elaborate?
> 
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

31852540 and 70c1647a add support for writing durations in the native matroska format. In the case of the global duration, this reads the value out of metadata when present (so writing it there as well would be redundant) and the metadata "duration" value in an actual MKV isn't read by anything anyway; for the stream durations, they're written as tags, so writing one from the metadata dict as well would create duplicate keys.


More information about the ffmpeg-devel mailing list