diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-18 21:05:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-18 21:05:46 +0200 |
commit | c01bcce4959a208a4f6b66fd527760ed45cd29bb (patch) | |
tree | 5c7c0bb45c5d3fc6ea0e1da7858da6e95802db77 | |
parent | a6ba5184a5e2a224f4f62bbb736b68dc416120fe (diff) | |
parent | d246231e4714119faac6c7acd881d3b687bb8b11 (diff) | |
download | ffmpeg-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.c | 5 |
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); |