]> git.sesse.net Git - ffmpeg/commit
avcodec/movtextdec: Simplify checking for invalid extradata
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 17 Oct 2020 11:13:23 +0000 (13:13 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 19 Oct 2020 02:56:32 +0000 (04:56 +0200)
commita42695c07244991ceabf9996d086dda3fcc28fc1
tree68a3cb767856b5060f5ace5fb0f46910f7487680
parent38cdd27e9b36183a74c19859a8092aca6e82d712
avcodec/movtextdec: Simplify checking for invalid extradata

Every font entry occupies at least three bytes, so checking early
whether there is that much data available is a low-effort way to exclude
invalid extradata. Doing so leads to an overall simplification.

Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/movtextdec.c