changeset 2644:ad769d06b84c libavformat

check if we found an audio track before initializing the audio stream
author aurel
date Thu, 18 Oct 2007 23:42:54 +0000
parents 3ffeea972e03
children cd029641333b
files electronicarts.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/electronicarts.c	Thu Oct 18 23:40:03 2007 +0000
+++ b/electronicarts.c	Thu Oct 18 23:42:54 2007 +0000
@@ -257,6 +257,7 @@
         st->codec->time_base = ea->time_base;
     }
 
+    if (ea->audio_codec) {
     /* initialize the audio decoder stream */
     st = av_new_stream(s, 0);
     if (!st)
@@ -274,6 +275,7 @@
 
     ea->audio_stream_index = st->index;
     ea->audio_frame_counter = 0;
+    }
 
     return 1;
 }