• wm4's avatar
    avformat/mp3dec: improve junk skipping heuristic · de1b1a7d
    wm4 authored
    Commit 2b3e9bbf caused problems for a
    certain API user:
    
    https://code.google.com/p/chromium/issues/detail?id=537725
    https://code.google.com/p/chromium/issues/detail?id=542032
    
    The problem seems rather arbitrary, because if there's junk, anything
    can happen. In this case, the imperfect junk skipping just caused it to
    read different junk, from what I can see.
    
    We can improve the accuracy of junk detection by a lot by checking if 2
    consecutive frames use the same configuration. While in theory it might
    be completely fine for the 1st frame to have a different format than the
    2nd frame, it's exceedingly unlikely, and I can't think of a legitimate
    use-case.
    
    This is approximately the same mpg123 does for junk skipping. The
    set of compared header bits is the same as the libavcodec mp3 parser
    uses for similar purposes.
    de1b1a7d
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
arch.mak Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
cmdutils_opencl.c Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
ffmpeg.c Loading commit data...
ffmpeg.h Loading commit data...
ffmpeg_dxva2.c Loading commit data...
ffmpeg_filter.c Loading commit data...
ffmpeg_opt.c Loading commit data...
ffmpeg_vdpau.c Loading commit data...
ffmpeg_videotoolbox.c Loading commit data...
ffplay.c Loading commit data...
ffprobe.c Loading commit data...
ffserver.c Loading commit data...
ffserver_config.c Loading commit data...
ffserver_config.h Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...