• Andreas Rheinhardt's avatar
    avformat/matroskaenc: Replace impossible condition with assert · ca0a38f2
    Andreas Rheinhardt authored
    If a FLAC track uses an unconventional channel layout, the Matroska
    muxer adds a WAVEFORMATEXTENSIBLE_CHANNEL_MASK VorbisComment to the
    CodecPrivate to preserve this information. And given that FLAC uses
    24bit length fields, the muxer checks if the length is more than this
    and errors out if it is.
    
    Yet this can never happen, because we create the AVDictionary that is
    the source for the VorbisComment. It only contains exactly one entry
    that can't grow infinitely large (in fact, the length of the
    VorbisComment is <= 4 + 33 + 1 + 18 + strlen(LIBAVFORMAT_IDENT)).
    So we can simply assert the size to be < (1 << 24) - 4.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    ca0a38f2
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools 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...
.mailmap Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md 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...
configure Loading commit data...