]> git.sesse.net Git - ffmpeg/commit
avcodec/dvdsubdec: reject some broken packets
authorwm4 <nfxjfg@googlemail.com>
Mon, 21 Sep 2015 16:22:35 +0000 (18:22 +0200)
committerwm4 <nfxjfg@googlemail.com>
Tue, 22 Sep 2015 15:41:01 +0000 (17:41 +0200)
commit9aab22223908180cbfc3c5fa1b19b58d806b5097
treee323842b08df512d585d16563b4a9349762af935
parentf874e2728b0925b2ec30dd7ec64815f15078c06f
avcodec/dvdsubdec: reject some broken packets

If cmd_pos is broken, this would just keep accumulating packets in the
reassembly buffer, until it fails and flushes the buffer on overflow.
Since packets are usually rather small, this will take a lot of subtitle
packets. The perceived effect is that subtitles are not displayed
anymore after the faulty packet was passed to the decoder.

I'm not terribly sure about this, but on the other hand this code is
active only when fragmented packets need to be reassembled.

Fixes sample file in trac issue #4872.
libavcodec/dvdsubdec.c