diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-29 00:48:50 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-29 00:48:50 +0100 |
commit | bf9a8d183ddcc65b5ae473bb048a3d38bd6df9f3 (patch) | |
tree | 167912dca18929bd66280c742e9b36f5088267fb /libavformat/riffenc.c | |
parent | 862174ec831d5fb01c44e8e3f7d3cd28002329bf (diff) | |
download | ffmpeg-streaming-bf9a8d183ddcc65b5ae473bb048a3d38bd6df9f3.zip ffmpeg-streaming-bf9a8d183ddcc65b5ae473bb048a3d38bd6df9f3.tar.gz |
Support writing E-AC3 in wav.
Diffstat (limited to 'libavformat/riffenc.c')
-rw-r--r-- | libavformat/riffenc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index 7828610..2af2b7f 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -72,6 +72,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc) waveformatextensible = (enc->channels > 2 && enc->channel_layout) || enc->sample_rate > 48000 || + enc->codec_id == AV_CODEC_ID_EAC3 || av_get_bits_per_sample(enc->codec_id) > 16; if (waveformatextensible) @@ -183,10 +184,14 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc) /* dwChannelMask */ avio_wl32(pb, enc->channel_layout); /* GUID + next 3 */ + if (enc->codec_id == AV_CODEC_ID_EAC3) { + ff_put_guid(pb, get_codec_guid(enc->codec_id, ff_codec_wav_guids)); + } else { avio_wl32(pb, enc->codec_tag); avio_wl32(pb, 0x00100000); avio_wl32(pb, 0xAA000080); avio_wl32(pb, 0x719B3800); + } } else { avio_wl16(pb, riff_extradata - riff_extradata_start); /* cbSize */ } |