aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-09-24 17:46:23 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-09-24 17:46:23 +0000
commitf2d65a6c8a0dba80a11236d17a499093788b12d3 (patch)
treecdfc789151d974cf0cc76e271f96a9cc7ba9a6c3 /libavformat
parentaeb627888d201c45b56e760c2aa595463aeb06f7 (diff)
downloadffmpeg-f2d65a6c8a0dba80a11236d17a499093788b12d3.tar.gz
Avoid segfault due to not set AVCodec.
Originally committed as revision 15400 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/wav.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c
index 75e05890e6..ba7315b360 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -45,7 +45,7 @@ static int wav_write_header(AVFormatContext *s)
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;
}