changeset 1549:3b4019c023a3 libavformat

Some VQA v1 files don't have audio stream
author kostya
date Sun, 03 Dec 2006 05:29:00 +0000
parents 5bb34e659b1c
children 4cb185273d4b
files westwood.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/westwood.c	Sat Dec 02 21:28:05 2006 +0000
+++ b/westwood.c	Sun Dec 03 05:29:00 2006 +0000
@@ -249,7 +249,7 @@
     st->codec->time_base.den = VQA_FRAMERATE;
 
     /* initialize the audio decoder stream for VQA v1 or nonzero samplerate */
-    if (LE_16(&header[24]) || (LE_16(&header[0]) == 1)) {
+    if (LE_16(&header[24]) || (LE_16(&header[0]) == 1 && LE_16(&header[2]) == 1)) {
         st = av_new_stream(s, 0);
         if (!st)
             return AVERROR_NOMEM;