On Fri, Feb 23, 2018 at 11:15:09AM -0800, Dale Curtis wrote: > 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 <dalecur...@chromium.org> > wrote: > > > 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 <dalecur...@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 <dalecur...@chromium.org> > >> > >> > >
> mpegaudio_parser.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > 91db6134e5c81519dd88289c8956851015183515 fix_trailing_garbage_mp3_v3.patch > From b81ec4a9a3907e21cc4c4abcf5502778be94076a Mon Sep 17 00:00:00 2001 > From: Dale Curtis <dalecur...@chromium.org> > Date: Thu, 22 Feb 2018 16:43:37 -0800 > Subject: [PATCH] [mpegaudio_parser] Skip trailing junk data when flushing > parser. > > 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. this goes the wrong direction. Parsers should not discard data by default. The code we have for tags is a hack. There are many better ways to handle this. Something similar to a AV_PKT_FLAG_CORRUPT set be the parser would be an example. This could then optionally be discarded [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel