diff options
author | Nicolas George | 2013-11-02 16:23:26 +0100 |
---|---|---|
committer | Nicolas George | 2013-11-03 10:29:27 +0100 |
commit | eeb975f5cda31aff3deb8cb4925ea0bf3e897236 (patch) | |
tree | 9c576a26d078073ca1c37a46b0acba313798d8d8 /libavformat/wavenc.c | |
parent | e56d1a120324fa49a5367cbf22098c5c7eb23f91 (diff) |
lavf/wavenc: check for a single stream.
Fix trac ticket #3110.
Diffstat (limited to 'libavformat/wavenc.c')
-rw-r--r-- | libavformat/wavenc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c index fea38cf326..0067dfef29 100644 --- a/libavformat/wavenc.c +++ b/libavformat/wavenc.c @@ -116,6 +116,11 @@ static int wav_write_header(AVFormatContext *s) AVIOContext *pb = s->pb; int64_t fmt; + if (s->nb_streams != 1) { + av_log(s, AV_LOG_ERROR, "WAVE files have exactly one stream\n"); + return AVERROR(EINVAL); + } + if (wav->rf64 == RF64_ALWAYS) { ffio_wfourcc(pb, "RF64"); avio_wl32(pb, -1); /* RF64 chunk size: use size in ds64 */ |