[FFmpeg-cvslog] r15400 - trunk/libavformat/wav.c

michael subversion
Wed Sep 24 19:46:23 CEST 2008


Author: michael
Date: Wed Sep 24 19:46:23 2008
New Revision: 15400

Log:
Avoid segfault due to not set AVCodec.


Modified:
   trunk/libavformat/wav.c

Modified: trunk/libavformat/wav.c
==============================================================================
--- trunk/libavformat/wav.c	(original)
+++ trunk/libavformat/wav.c	Wed Sep 24 19:46:23 2008
@@ -45,7 +45,7 @@ static int wav_write_header(AVFormatCont
     fmt = start_tag(pb, "fmt ");
     if (put_wav_header(pb, s->streams[0]->codec) < 0) {
         av_log(s, AV_LOG_ERROR, "%s codec not supported in WAVE format\n",
-               s->streams[0]->codec->codec->name);
+               s->streams[0]->codec->codec ? s->streams[0]->codec->codec->name : "NONE");
         av_free(wav);
         return -1;
     }




More information about the ffmpeg-cvslog mailing list