On 26.05.2015 15:55, Vittorio Giovara wrote:
> On Tue, May 26, 2015 at 2:31 PM, Hendrik Leppkes <h.lepp...@gmail.com> wrote:
>> On Tue, May 26, 2015 at 3:24 PM, Vittorio Giovara
>> <vittorio.giov...@gmail.com> wrote:
>>> From: Thierry Foucu <tfo...@gmail.com>
>>>
>>> Signed-off-by: Michael Niedermayer <michae...@gmx.at>
>>> Signed-off-by: Vittorio Giovara <vittorio.giov...@gmail.com>
>>> ---
>>>  libavformat/mov.c | 6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/libavformat/mov.c b/libavformat/mov.c
>>> index 70fa1e0..a965328 100644
>>> --- a/libavformat/mov.c
>>> +++ b/libavformat/mov.c
>>> @@ -1989,6 +1989,12 @@ static int mov_read_stts(MOVContext *c, AVIOContext 
>>> *pb, MOVAtom atom)
>>>              av_log(c->fc, AV_LOG_ERROR, "Invalid sample_count=%d\n", 
>>> sample_count);
>>>              return AVERROR_INVALIDDATA;
>>>          }
>>> +        /* sample_duration < 0 is invalid based on the spec */
>>> +        if (sample_duration < 0) {
>>> +            av_log(c->fc, AV_LOG_ERROR,
>>> +                   "Invalid SampleDelta in STTS %d", sample_duration);
>>> +            sample_duration = 1;
>>> +        }
>>>          sc->stts_data[i].count= sample_count;
>>>          sc->stts_data[i].duration= sample_duration;
>>>
>>
>> This patch was on this ML before, and either rejected or the
>> discussion was never resolved - because there are actually samples in
>> the wild which this change will break.
>> Feel free to lookup the previous discussion.
> 
> As I don't have a strict need about it, I'm fine with having this dropped.
> Previous discussion: https://patches.libav.org/patch/30846/ - sample
> still available.

That's a different patch.
Above patch basically gives just a warning (so it should be AV_LOG_WARNING)
and sets a valid sample_duration.
Playing the sample still works fine in ffmpeg.

Best regards,
Andreas

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to