# HG changeset patch # User michael # Date 1222278383 0 # Node ID 1aa5e41ceaef3ca08978449266cd126f44a86b49 # Parent 4ab8a237c386afc597d016231c831e45a6a59ca7 Avoid segfault due to not set AVCodec. diff -r 4ab8a237c386 -r 1aa5e41ceaef wav.c --- 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; }