aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/sh4
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-06 14:57:38 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-11 19:19:50 +0200
commitcf3f8ab9e67b005e13ddbbc2315bf0aaddd5374b (patch)
tree16726d6f6ac1377ef8e3014ba7948de72b4081e2 /libavutil/sh4
parente254af31549ce6b4964936b3fe2124c3a18e69f8 (diff)
downloadffmpeg-cf3f8ab9e67b005e13ddbbc2315bf0aaddd5374b.tar.gz
avcodec/hevc_sei: Fix parsing SEI messages
SEI messages are naturally byte-aligned by adding padding bits to achieve byte-alignment. The parsing code in libavcodec/hevc_sei.c nevertheless uses a GetBitContext to read it. When doing so, parsing the next SEI message starts exactly at the position where reading the last message (if any) ended. This means that one would have to handle both the payload extension data (which makes most SEI messages extensible structs) as well as the padding bits for byte-alignment. Yet our SEI parsing code in libavcodec/hevc_sei.c does not read these at all. Instead several of the functions used for parsing specific SEI messages use skip_bits_long(); some don't use it at all, in which case it is possible for the GetBitContext to not be byte-aligned at the start of the next SEI message (the parsing code for several types of SEI messages relies on byte-alignment). Fix this by always using a dedicated GetBitContext per SEI message; skipping the necessary amount of bytes in the NALU context is done at a higher level. This also allows to remove unnecessary parsing code that only existed in order to skip enough bytes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavutil/sh4')
0 files changed, 0 insertions, 0 deletions