aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-18 21:05:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-18 21:05:46 +0200
commitc01bcce4959a208a4f6b66fd527760ed45cd29bb (patch)
tree5c7c0bb45c5d3fc6ea0e1da7858da6e95802db77
parenta6ba5184a5e2a224f4f62bbb736b68dc416120fe (diff)
parentd246231e4714119faac6c7acd881d3b687bb8b11 (diff)
downloadffmpeg-c01bcce4959a208a4f6b66fd527760ed45cd29bb.tar.gz
Merge commit 'd246231e4714119faac6c7acd881d3b687bb8b11'
* commit 'd246231e4714119faac6c7acd881d3b687bb8b11': wavenc: use codec descriptors to get the codec name Conflicts: libavformat/wavenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/wavenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c
index c892c7b34d..101bdb2c71 100644
--- a/libavformat/wavenc.c
+++ b/libavformat/wavenc.c
@@ -142,9 +142,10 @@ static int wav_write_header(AVFormatContext *s)
/* format header */
fmt = ff_start_tag(pb, "fmt ");
if (ff_put_wav_header(pb, s->streams[0]->codec, 0) < 0) {
+ const AVCodecDescriptor *desc = avcodec_descriptor_get(s->streams[0]->codec->codec_id);
av_log(s, AV_LOG_ERROR, "%s codec not supported in WAVE format\n",
- s->streams[0]->codec->codec ? s->streams[0]->codec->codec->name : "NONE");
- return -1;
+ desc ? desc->name : "unknown");
+ return AVERROR(ENOSYS);
}
ff_end_tag(pb, fmt);