aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-11-06 02:13:36 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-06 12:40:49 +0100
commit76950e5247334dee45bdc73af7a2f134fea4da02 (patch)
tree2fe1178bfb26a47d100bdc93c8a467e990674e40 /libavformat
parenta3ff74c872ab7fe1e7a9ad32b2622d4aa18aea50 (diff)
downloadffmpeg-76950e5247334dee45bdc73af7a2f134fea4da02.tar.gz
avformat/xmv: Discard remainder of packet on error
Fixes infinite loop Fixes: 9c48ae2680c5f23bca3d20ff0f325fd8/asan_generic_4c254d_1374_993f1e5967dd6f844b8d72f978ce2a6c.pss Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 79c4a338e4b2bf0bc6f81c9f455994f673a92f78) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/xmv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index cee2c806de..1410bff8ee 100644
--- a/libavformat/xmv.c
+++ b/libavformat/xmv.c
@@ -552,8 +552,11 @@ static int xmv_read_packet(AVFormatContext *s,
result = xmv_fetch_audio_packet(s, pkt, xmv->current_stream - 1);
}
- if (result)
+ if (result) {
+ xmv->current_stream = 0;
+ xmv->video.current_frame = xmv->video.frame_count;
return result;
+ }
/* Increase our counters */