[FFmpeg-devel] [PATCH] md5: change flags to match framemd5.

Hendrik Leppkes h.leppkes at gmail.com
Sat Sep 5 14:22:48 CEST 2015


On Sat, Sep 5, 2015 at 2:16 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sat, Sep 05, 2015 at 07:11:39AM -0400, Ronald S. Bultje wrote:
>> This prevents the following warning: "Application provided invalid, non
>> monotonically increasing dts to muxer in stream 0: 9 >= 9".
>> ---
>>  libavformat/md5enc.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c
>> index 8e87f09..e1a5368 100644
>> --- a/libavformat/md5enc.c
>> +++ b/libavformat/md5enc.c
>> @@ -107,7 +107,8 @@ AVOutputFormat ff_md5_muxer = {
>>      .write_header      = write_header,
>>      .write_packet      = write_packet,
>>      .write_trailer     = write_trailer,
>> -    .flags             = AVFMT_NOTIMESTAMPS,
>> +    .flags             = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT |
>> +                         AVFMT_TS_NEGATIVE,
>>      .priv_class        = &md5enc_class,
>>  };
>>  #endif
>
> The warning indicates a problem, I dont think we should "remove" the
> warning without fixing the problem
>
> also some kind of md5 checksum muxer which validates timestamps for
> regression tests should be kept. Validating timestamps is important
>
> Tests which pass timestamp validation currently should raise a big
> red flag when they fail.
> Ive not checked but i suspect md5 would not give any indication that
> good valid timestamps changed into bad invalid ones, it would give
> the same checksum with no warnings either way
> That would be rather bad for regression tests as worsening timestamp
> validity could be easily missed
>

IMHO if you wanted to test timestamps of individual frames, you would
use framemd5, as that will immediately show the difference in the
timestamps in the output, and not abort on a somewhat confusing
generic avformat error.

- Hendrik


More information about the ffmpeg-devel mailing list