[FFmpeg-devel] [mpegaudio_parser] Skip trailing junk data when flushing parser.

Dale Curtis dalecurtis at chromium.org
Fri Feb 23 21:15:09 EET 2018

Whoops, that version spams on every flush; changed to only print when
buf_size > 0.

- dale

On Fri, Feb 23, 2018 at 10:37 AM, Dale Curtis <dalecurtis at chromium.org>

> After some deeper testing it looks like this mechanism can actually fully
> replace the existing ID3 and APE tag skips; so I've simplified the patch to
> do so.
> - dale
> On Thu, Feb 22, 2018 at 4:46 PM, Dale Curtis <dalecurtis at chromium.org>
> wrote:
>> The parser should only return valid mpeg audio packets; it generally
>> does so, but in the case of flush, it returns whatever happens to
>> be in the buffer instead of ensuring its first a valid mpeg packet.
>> The fix is to check whether a valid frame size has been parsed and
>> if not discard the packet when flushing.
>> This should fix all sorts of mp3 files with trailing garbage.
>> Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_trailing_garbage_mp3_v3.patch
Type: text/x-patch
Size: 1847 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180223/c685bb19/attachment.bin>

More information about the ffmpeg-devel mailing list