[FFmpeg-devel] [PATCH] make analyze_duration work for streams with incomplete timestamps (mp3)
Mon Sep 14 02:17:54 CEST 2009
On Mon, Sep 14, 2009 at 01:55:06AM +0200, Michael Niedermayer wrote:
> On Sun, Sep 13, 2009 at 12:41:09PM +0200, Reimar D?ffinger wrote:
> > Hello,
> > currently max_analyze_duration does not work for e.g.
> > http://22.214.171.124:80/KDLDFM because the mpeg audio parser is very
> > thorough in making a mess of timestamps.
> > Basically, only every 4th packet has a timestamp and thus none at all
> > have any duration.
> > Attached patch handles this case by using the difference between the
> > minimum and current dts for comparing against max_analyze_duration when
> > we have no other duration info.
> i think your code introduces a nasty bug, namely it fails fatally in case
> of positive timestamp discontinuities, that is the code retunrns before its done
> also we already have the last_dts table that could be used but really i dont
> think this is the correct solution
> the correct solution IMHO is to set duration, and actually i would naively
> expect compute_frame_duration)()/get_audio_frame_size() to do so, but it seems
> that its not otherwise this issue wouldnt exist ...
also there is AVFMT_TS_DISCONT, which when its not set would make it possible
to use dts
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> ... defining _GNU_SOURCE...
For the love of all that is holy, and some that is not, don't do that.
-- Luca & Mans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel