• wm4's avatar
    avformat/mp3: skip junk at the beginning of mp3 files · 2b3e9bbf
    wm4 authored
    Apparently it can happen that a mp3 file has junk data between id3 tag
    and actual mp3 data. Skip this to avoid outputting nonsense timestamps.
    (Two packets had the same timestamps, because the mp3 parser failed to
    compute a frame duration.)
    
    In this case, the junk consisted of 1044 bytes of zero, which
    incidentally is the same size as normal mp3 frames in this stream. I
    suspect the mp3 was edited with some tool which wiped the Xing/LAME
    headers. Data near the end of the file suggests it was encoded with
    "LAME3.97", but the normal Xing/LAME headers are missing. So this could
    be "normal". mpg123 also attempts to skip at least 64KB of junk data by
    scanning for headers.
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    2b3e9bbf
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...
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_vda.c Loading commit data...
ffmpeg_vdpau.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...