[FFmpeg-devel] [PATCH] fix parsing of broken mp3 streams
Michael Niedermayer
michaelni
Mon Apr 20 22:53:56 CEST 2009
On Mon, Apr 20, 2009 at 09:37:25PM +0200, Zdenek Kabelac wrote:
> 2009/4/19 Michael Niedermayer <michaelni at gmx.at>:
> > On Sun, Apr 19, 2009 at 11:18:06PM +0200, Zdenek Kabelac wrote:
> >> Hi
> >>
> >> Here is a small patch that fixes of running out-of-buffer in parsing
> >> broken mp3 data stream.
> >> This solution is rather a hotfix - better solution would be to check
> >> at least one or two next mp3
> >> frames in sequence whether they are part of the same audio stream or
> >> some random junk
> >> which has 0xfffx header inside. With this patch ugly noise could be
> >> sometimes noticed.
> >>
> >> Also questionable is whether it should return -1 if no header is found
> >> or rather return skipped
> >> bytes and out_size = 0 - as then usually such packet is rescaned
> >> multiple times with
> >> one-byte step forward...
> >>
> >> Zdenek
> >>
> >> - Fix buffer overrun
> >> - Properly return parsed bytes together with skipped bytes
> >
> > please provide a sample so we can confirm the bugfix, the patch
> > looks mostly correct though
> >
>
> I've upload just one mp3 dumped stream upload.ffmpeg.org as
> junk_at_mp3stream directory - together with short text and two patch
> - I'm attaching patch for api-example.c to easily compare results.
i dont care what a modified tool does
is there a problem that is reproduceable with ffmpeg or ffplay that
your patch fixes?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Old school: Use the lowest level language in which you can solve the problem
conveniently.
New school: Use the highest level language in which the latest supercomputer
can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090420/5bc63989/attachment.pgp>
More information about the ffmpeg-devel
mailing list