[FFmpeg-devel] [PATCH] flac demuxer: improve seeking

Michael Niedermayer michaelni at gmx.at
Sun Apr 13 15:06:31 CEST 2014


On Sat, Apr 12, 2014 at 06:31:11PM +0000, Rainer Hochecker wrote:
> Michael Niedermayer <michaelni <at> gmx.at> writes:
> 
> > 
> > On Sat, Apr 12, 2014 at 06:17:15PM +0200, Rainer Hochecker wrote:
> > > ---
> > >  libavcodec/flac_parser.c | 10 ++++++++++
> > >  libavformat/flacdec.c    | 27 +++++++++++++++++++++++++++
> > >  2 files changed, 37 insertions(+)
> > 
> > this breaks
> > make fate-seek-acodec-flac
> > 
> > [...]
> 
> Sorry, I forgot to run these tests. Yes, the results are slightly different
> but I think still ok. I ran this code with real world examples and did not
> observe any problems.
> The new seek strategy causes slightly different results. Are you ok if I
> change the unit test?

i dont think the new results are ok
for example looking at the first difference:

    --- ./tests/ref/seek/acodec-flac    2014-04-13 14:59:47.878887999 +0200
+++ tests/data/fate/seek-acodec-flac    2014-04-13 15:02:29.310891400 +0200
@@ -1,32 +1,34 @@
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   8256 size:   614
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   8256 size:   614
+ret: 0         st: 0 flags:1 dts: 0.026122 pts: 0.026122 pos:   8870 size:   614

the seek aims at time -1, and previously seeks to 0, which i guess
is the first packet
after the patch the seek goes to 0.026122 at filepos 8870, which
does not look like the first packet

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- 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/20140413/f3d62ff4/attachment.asc>


More information about the ffmpeg-devel mailing list