aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacenc_is.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-03-25 06:00:53 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-20 10:51:30 +0200
commit26d1e77923f35bcd959249dd5a351e30a93a65f0 (patch)
tree8fa13d525a6a7cf79854b070ba1d847121df612e /libavcodec/aacenc_is.h
parent588d258ea430cea3e954da8e553746e6f1a4b5bc (diff)
downloadffmpeg-26d1e77923f35bcd959249dd5a351e30a93a65f0.tar.gz
avformat/matroskadec: Don't discard valid packets
A Block (meaning both a Block in a BlockGroup as well as a SimpleBlock) must have at least three bytes after the field containing the encoded TrackNumber. So if there are <= 3 bytes, the Matroska demuxer would skip this block, believing it to be an empty, but valid Block. This might discard valid nonempty Blocks, namely if the track uses header stripping. And certain definitely spec-incompliant Blocks don't raise errors: Those with two or less bytes left after the encoded TrackNumber and those with three bytes left, but with flags indicating that the Block uses lacing as then there has to be further data describing the lacing. Furthermore, zero-sized packets were still possible because only the size of the last entry of a lace was checked. This commit fixes this. All spec-compliant Blocks that contain data (even if side data only) are now returned to the caller; spec-compliant Blocks that don't contain anything are not returned. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit e471faf96230076f67e393df9d1a90a08c22a055)
Diffstat (limited to 'libavcodec/aacenc_is.h')
0 files changed, 0 insertions, 0 deletions