]> git.sesse.net Git - ffmpeg/commit
avcodec/sheervideo: Don't leave context in inconsistent state upon error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 10 Oct 2020 18:11:49 +0000 (20:11 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 10 Oct 2020 18:49:26 +0000 (20:49 +0200)
commit8969b9aa061790a5e87694aab17741cc7647d099
tree880987e3c50da4c9fd2e7e4030d1e95d120f74ec
parent07185f331e2414ddff80df342f2ff7aaca08e26d
avcodec/sheervideo: Don't leave context in inconsistent state upon error

This has happened if the format changed midstream and if the new packet
is so small that it is instantaneously rejected: In this case the VLC
tables were for the new format, although the context says that they are
still the ones for the old format. It can also happen if the format
changed midstream and the allocation of the new tables fails. If the
next packet is a packet for the old format, the decoder thinks it
already has the correct VLC tables, leading to a segfault.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/sheervideo.c