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

Clément Bœsch ubitux at gmail.com
Mon Jan 30 23:44:00 CET 2012


On Mon, Jan 30, 2012 at 11:27:44PM +0100, Clément Bœsch wrote:
> On Mon, Jan 30, 2012 at 05:11:26PM +0100, Michael Niedermayer wrote:
> > 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
> > 
> 
> Thank you, please check if the comment is accurate enough.
> 
> -- 
> Clément B.

> From ed013b275d08144697857cbd9091aef644c3590d Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubitux at gmail.com>
> Date: Fri, 27 Jan 2012 21:28:47 +0100
> Subject: [PATCH] lavf: do not raise max_analyze_duration warning with raw
>  audio files.
> 
> Solution-by: Michael Niedermayer
> ---
>  libavformat/utils.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 

Patch dropped, doesn't work as expected. Sorry for the noise.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120130/c1fe2bf1/attachment.asc>


More information about the ffmpeg-devel mailing list