[FFmpeg-devel] [PATCH] libvorbis codec repeats timestamp at EOF

Henrik Gulbrandsen henrik
Thu Apr 17 00:29:22 CEST 2008

Here's the second patch. To reproduce the problem, you must configure
FFmpeg with --enable-libvorbis --disable-encoder=vorbis, since vorbis
will otherwise always be used even if libvorbis is explicitly specified.
There should probably be a warning that keeps people from configuring
both encoders at the same time, but that is a slightly different issue.

For ffmpeg -i audio.flac -acodec libvorbis audio.ogg the encoding ends
with an error similar to this one:

    error, non monotone timestamps 7714944 >= 7714944
    av_interleaved_write_frame(): Error while opening file

and the last few bytes of the file are never written. I traced this to a
scenario where oggvorbis_encode_frame() is called multiple times with
NULL data to flush the buffers, but libvorbis doesn't like to get EOF
more than one time, so I simply added a check so it's only called once.


P.S. Is there any chance that someone can either increase the verbosity
level of the "Multiple frames in a packet" message, so it's not visible
by default, or make it print just a single time? I guess the intention
is to force people to refactor the FLAC codec, but with over 6000 lines
of error messages, I'm more likely to simply use "-v 0" instead...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvorbis_eof.patch
Type: text/x-patch
Size: 524 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080417/c12a9ead/attachment.bin>

More information about the ffmpeg-devel mailing list