Interim fix of the parsing of idx1 indexes with 'xxpc' (palette change) entries.

Implementation of 'xxpc' index entry storage for seeking will come in the future (provided I can manage it).

Test file TOON.AVI from King's Quest VI with indexed 'xxpc' chunks which would previously cause "stream_ptr out of bounds" error messages to be emitted in the msvideo1 decoder:

https://drive.google.com/open?id=0B3_pEBoLs0faaFY0ME92SDA1VEU

Mats

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
>From 7ad8519fe62008cdd84039fd6949488982a3ee3b Mon Sep 17 00:00:00 2001
From: Mats Peterson <matsp...@yahoo.com>
Date: Wed, 9 Mar 2016 23:18:07 +0100
Subject: [PATCH 1/3] lavf/avidec: Skip xxpc entries in index; fixes trac #5311

---
 libavformat/avidec.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index eaf8421..49c97d9 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1581,6 +1581,9 @@ static int avi_read_idx1(AVFormatContext *s, int size)
         st  = s->streams[index];
         ast = st->priv_data;
 
+        if ((tag >> 16 & 0xff) == 'p' && (tag >> 24 & 0xff) == 'c')
+            continue;
+
         if (first_packet && first_packet_pos) {
             if (avi->movi_list + 4 != pos || pos + 500 > first_packet_pos)
                 data_offset  = first_packet_pos - pos;
-- 
1.7.10.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to