[FFmpeg-devel] [PATCH] avcodec/mp3: fix skipping zeros

Michael Niedermayer michaelni at gmx.at
Wed Sep 30 15:41:04 CEST 2015

On Wed, Sep 30, 2015 at 02:54:11PM +0200, wm4 wrote:
> Commits 43bc5cf9 and c5371f77 add code for skipping initial zeros in mp3
> packets. (There are no explanations, no samples.)
> This code forgot to report to the user that data was skipped at all. IT
> should do this by adding the skipped amount of bytes to the amount of
> consumed bytes returned by the decode call.
> Since audio codecs allow partial packet decoding, the user application
> has to rely on the return value. It will remove the data reported as
> consumed by the decoder, and feed it to the decoder again. This resulted
> in the mp3 frame after the zero region to be decoded over and over
> again, until the zero region was finally skipped by the application.
> Fixes trac ticket #4890.
> ---
>  libavcodec/mpegaudiodec_template.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150930/1fb21978/attachment.sig>

More information about the ffmpeg-devel mailing list