[PATCH] quartz: Ignore unknown chunks when parsing AVI headers.

Lei Zhang thestig at google.com
Thu Dec 18 18:55:43 CST 2008


Hi,

AVI files have two required chunks: 'hdrl' and 'movi'. In the AVI file
header, there are other chunks that contain metadata in between there
two. We currently ignore the 'JUNK' chunks and 'INFO' chunks. However,
other chunks can exist as well. I.e. I found a movie with the 'ncdt'
(nikon camera data?) chunk. When we encounter this unknown chunk, we
should ignore it and continue, rather than comparing it to 'movi' and
failing.
-------------- next part --------------
From 749d33457fd902d65575c8cb8dff7af38372c00b Mon Sep 17 00:00:00 2001
From: Lei Zhang <thestig at google.com>
Date: Thu, 18 Dec 2008 16:47:09 -0800
Subject: [PATCH] quartz: Ignore unknown chunks when parsing AVI headers.

---
 dlls/quartz/avisplit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c
index 94d2c9b..1c9631d 100644
--- a/dlls/quartz/avisplit.c
+++ b/dlls/quartz/avisplit.c
@@ -1081,7 +1081,7 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
     pos += sizeof(RIFFCHUNK) + list.cb;
     hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list);
 
-    while (list.fcc == ckidAVIPADDING || (list.fcc == FOURCC_LIST && list.fccListType == ckidINFO))
+    while (list.fcc == ckidAVIPADDING || (list.fcc == FOURCC_LIST && list.fccListType != listtypeAVIMOVIE))
     {
         pos += sizeof(RIFFCHUNK) + list.cb;
 
-- 
1.5.4.5


More information about the wine-patches mailing list