[FFmpeg-cvslog] lavf/wavenc: check for a single stream.

Nicolas George git at videolan.org
Sun Nov 3 14:03:09 CET 2013


ffmpeg | branch: master | Nicolas George <george at nsup.org> | Sat Nov  2 16:23:26 2013 +0100| [eeb975f5cda31aff3deb8cb4925ea0bf3e897236] | committer: Nicolas George

lavf/wavenc: check for a single stream.

Fix trac ticket #3110.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eeb975f5cda31aff3deb8cb4925ea0bf3e897236
---

 libavformat/wavenc.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c
index fea38cf..0067dfe 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 */



More information about the ffmpeg-cvslog mailing list