Commit c01bcce4 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'd246231e'

* commit 'd246231e':
  wavenc: use codec descriptors to get the codec name

Conflicts:
	libavformat/wavenc.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a6ba5184 d246231e
...@@ -142,9 +142,10 @@ static int wav_write_header(AVFormatContext *s) ...@@ -142,9 +142,10 @@ static int wav_write_header(AVFormatContext *s)
/* format header */ /* format header */
fmt = ff_start_tag(pb, "fmt "); fmt = ff_start_tag(pb, "fmt ");
if (ff_put_wav_header(pb, s->streams[0]->codec, 0) < 0) { 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", 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"); desc ? desc->name : "unknown");
return -1; return AVERROR(ENOSYS);
} }
ff_end_tag(pb, fmt); ff_end_tag(pb, fmt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment