Mercurial > libavformat.hg
changeset 3934:1aa5e41ceaef libavformat
Avoid segfault due to not set AVCodec.
author | michael |
---|---|
date | Wed, 24 Sep 2008 17:46:23 +0000 |
parents | 4ab8a237c386 |
children | d30c8469093d |
files | wav.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/wav.c Wed Sep 24 17:17:11 2008 +0000 +++ b/wav.c Wed Sep 24 17:46:23 2008 +0000 @@ -45,7 +45,7 @@ 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; }