[FFmpeg-devel] [PATCH] avformat/mp3dec: avoid early EOF with concatenated gapless mp3s
Michael Niedermayer
michaelni at gmx.at
Sun Sep 21 15:10:55 CEST 2014
On Sun, Sep 21, 2014 at 12:51:41PM +0200, wm4 wrote:
> Consider a file created with something like:
>
> cat file1.mp3 file2.mp3 > result.mp3
>
> Then if file2.mp3 has gapless information, result.mp3 would stop playing
> something in the middle. This happens because the gapless info directs
> the decoder to discard all samples after a certain position. To make
> matters worse, the gapless info of file2.mp3 will be used when playing
> the file1.mp3 part, because the gapless info is located at the end of
> the file.
>
> While handling concatenated gapless files correctly would be insane and
> a lot of effort (especially without scanning the whole file on opening),
> it's easy to prevent at least early EOF. Playback will happen to work,
> even if it's slightly broken.
> ---
> libavformat/avformat.h | 9 ++++++++-
> libavformat/mp3dec.c | 6 ++++--
> libavformat/utils.c | 7 ++++---
> 3 files changed, 16 insertions(+), 6 deletions(-)
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/cc800a9e/attachment.asc>
More information about the ffmpeg-devel
mailing list