[FFmpeg-devel] [PATCH] flv duration

elupus elupus
Sun Apr 4 12:28:52 CEST 2010


On Sat, 03 Apr 2010 18:41:24 -0700, Howard Chu wrote:

> Howard Chu wrote:
>> Michael Niedermayer wrote:
>>> On Thu, Apr 01, 2010 at 02:28:11AM -0700, Howard Chu wrote:
>>>> When playing an FLV, you always see this message:
>>>>
>>>> [flv @ 0x120cea0]Estimating duration from bitrate, this may be inaccurate
>>>>
>>>> even if the FLV metadata provides the duration. I'd been ignoring this for
>>>> the most part, but after someone else mentioned it on irc I decided to take
>>>> a look. The FLV demux sets the AVFormatContext->duration based on the
>>>> metadata, but the av_has_duration() function wants to see it set in one of
>>>> the AVStreams. It looks to me like it does no harm one way or the other,
>>>> but I wrote this patch just to shut up that diagnostic.
>>
>>> you dont need to set s->duration
>>
>> OK. Works fine, make test passes.
> 
> Spoke too soon. Not setting s->duration breaks XBMC.

In what way? lavf should have populated that from the stream duration
anyway.

Joakim




More information about the ffmpeg-devel mailing list