aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/bitpacked_dec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-07 22:23:47 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-08 21:00:52 +0100
commitcc1251ab814374ffb27cdebf2099b11a422d8187 (patch)
tree87e73f307eb38e982ac903512232da429de01fc2 /libavcodec/bitpacked_dec.c
parentcce2765ce9dee0c653e725282107694ed0ed345a (diff)
downloadffmpeg-cc1251ab814374ffb27cdebf2099b11a422d8187.tar.gz
avcodec/movtextdec: Sanitize style entries
There are three types of style entries which are redundant: a) Entries with length zero. They are already discarded. b) Entries that are equivalent to the default style: They can be safely discarded. c) Entries that are equivalent to the immediately preceding style if the start of the current style coincides with the end of the preceding style. In this case the styles can be merged. This commit implements discarding/merging in cases b) and c). This fixes ticket #9548. In said ticket each packet contained exactly one style entry that covered the complete packet with the exception of the last character (probably created by a tool that didn't know that the style's end is exclusive). Said style coincided with the default style, leading to a superfluous reset, which is now gone. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/bitpacked_dec.c')
0 files changed, 0 insertions, 0 deletions