[FFmpeg-devel] [PATCH] avformat/mp3dec: avoid early EOF with concatenated gapless mp3s

Michael Niedermayer michaelni at gmx.at
Sun Sep 21 16:44:19 CEST 2014

On Sun, Sep 21, 2014 at 04:26:37PM +0200, wm4 wrote:
> On Sun, 21 Sep 2014 15:59:43 +0200
> James Darnley <james.darnley at gmail.com> wrote:
> > On 2014-09-21 12:51, wm4 wrote:
> > > it's easy to prevent at least early EOF. Playback will happen to work,
> > > even if it's slightly broken.
> > 
> > Do we want to print a warning in the "slightly broken" case?  Does it
> > just mean that the middle cannot be gapless between file1 and file2?
> > 
> Well, it means that while decoding the packet stream, the gapless info
> of file2 will be applied. If file1 is longer than file2, some random
> samples in the middle of file1 will be dropped. If file2 is longer,
> some random samples in the middle of file2 will be dropped.

> One could just print a warning if mp3 data is successfully parsed after
> the expected end (end according to the length of the file in frames
> stored in the gapless info), but I didn't want to add another flag to
> the context. (Without such a flag you would print the warning after
> every packet read.)

the pts could be checked to be == end + 1 or something like that,
this would ensure the warning is printed once on sequential Playback
over the problematic point


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140921/52697f70/attachment.asc>

More information about the ffmpeg-devel mailing list