[FFmpeg-devel] [PATCH 1/2] lavf: make max_analyze_duration warning an information log.

Michael Niedermayer michaelni at gmx.at
Mon Jan 30 17:11:26 CET 2012


On Sat, Jan 28, 2012 at 11:45:37AM +0100, Clément Bœsch wrote:
> On Sat, Jan 28, 2012 at 02:10:43AM +0100, Michael Niedermayer wrote:
> [...]
> > > > > --- ./tests/ref/seek/mp2_mp2    2011-01-18 21:10:05.123248731 +0100
> > > > > +++ tests/data/fate/seek-mp2_mp2        2012-01-27 21:25:56.926199589 +0100
> > > > > @@ -1,6 +1,6 @@
> > > > > -ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:      0 size:   417
> > > > > +ret: 0         st: 0 flags:1 dts: NOPTS    pts: NOPTS    pos:      0 size:   417
> > > > >  ret: 0         st:-1 flags:0  ts:-1.000000
> > > > > -ret: 0         st: 0 flags:1 dts: 0.026122 pts: 0.026122 pos:    417 size:   418
> > > > > +ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:      0 size:   417
> > > > >  ret: 0         st:-1 flags:1  ts: 1.894167
> > > > >  ret: 0         st: 0 flags:1 dts: 1.880816 pts: 1.880816 pos:  30093 size:   418
> > > > >  ret: 0         st: 0 flags:0  ts: 0.788334
> > > > > 
> > > > > Note that FATE passes when I do the same with the FLAC.
> > > > 
> > > > you could try setting cur_dts = 0 in read_header of mp3
> > > > 
> > > 
> > > This seems not be needed (and doesn't fix anything); in avformat_new_stream():
> > 
> > hmm, try:
> > 
> > st->first_dts == AV_NOPTS_VALUE && !((ic->iformat->flags & AVFMT_NOTIMESTAMPS) && st->cur_dts))
> > 
> 
> This seems to do the trick, thank you, see attached patch. I guess it
> applies to a lot of other audio formats, should we add the flag when
> necessary?
> 

> Or can't we just do the exact opposite: assume audio codecs have no
> timestamps and add have an expection for those who have (if anyone has one
> in mind...)?

this might be simpler if it works
it would need the following checks at least
nb_streams==1
AVFMTCTX_NOHEADER not set (otherwise more streams can appear later)
cur_dts != 0
type == audio

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There seems to be only one solution to NIH syndrom, ... a shooting squad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120130/86c27e62/attachment.asc>


More information about the ffmpeg-devel mailing list