Browse Source

check if we found an audio track before initializing the audio stream

Originally committed as revision 10804 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Aurelien Jacobs 18 years ago
parent
commit
c611463fe4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/electronicarts.c

+ 2
- 0
libavformat/electronicarts.c View File

@@ -257,6 +257,7 @@ static int ea_read_header(AVFormatContext *s,
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 @@ static int ea_read_header(AVFormatContext *s,

ea->audio_stream_index = st->index;
ea->audio_frame_counter = 0;
}

return 1;
}


Loading…
Cancel
Save