lavc: Fix ticket 6024, truncated mode decoding
authorPavel Koshevoy <pkoshevoy@gmail.com>
Thu, 15 Dec 2016 17:19:23 +0000 (10:19 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 17 Dec 2016 17:41:18 +0000 (18:41 +0100)
commit6b517a194da47a2d586806679ef6ca9233ee32d6
tree2025293e3fc4ac44f21eaf9c42c4ac55c5bbd674
parent5b74ebe93723323c3f7068d8ff1fb44b43d8fc67
lavc: Fix ticket 6024, truncated mode decoding

The assumption that avcodec_send_packet makes regarding decoders
consuming the entire packet is not true if the codec supports
truncated decoding mode and the truncated flag is turned on.

Steps to reproduce:
./ffmpeg_g -flags truncated \
-i "http://samples.ffmpeg.org/MPEG2/test-ebu-422.40000.pakets.ts" \
-c:v ffv1 -c:a copy -y /tmp/truncated.nut

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/utils.c