1
From 28d948ac44e38e8bec2f6268ccf4747ff4d992a9 Mon Sep 17 00:00:00 2001
2
From: Laurent Aimar <fenrir@videolan.org>
3
Date: Sun, 18 Sep 2011 00:03:08 +0200
4
Subject: [PATCH 64/70] rv10: Reject slices that does not have the same type as the first one
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
9
This prevents crashes with some corrupted bitstreams.
11
Signed-off-by: Martin Storsjö <martin@martin.st>
12
(cherry picked from commit 4a29b471869353c3077fb4b25b6518eb1047afb7)
14
Signed-off-by: Anton Khirnov <anton@khirnov.net>
16
libavcodec/rv10.c | 5 +++++
17
1 files changed, 5 insertions(+), 0 deletions(-)
19
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
20
index 78f97b1..223500c 100644
21
--- a/libavcodec/rv10.c
22
+++ b/libavcodec/rv10.c
23
@@ -543,6 +543,11 @@ static int rv10_decode_packet(AVCodecContext *avctx,
24
if(MPV_frame_start(s, avctx) < 0)
28
+ if (s->current_picture_ptr->pict_type != s->pict_type) {
29
+ av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n");
34
av_dlog(avctx, "qscale=%d\n", s->qscale);