aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-12-13 11:57:39 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-12-13 11:57:39 +0100
commitfb5518cfb76af414a46366f74bffb5874bf3bfc4 (patch)
treecf92453f5f7ccefa356b4b46f9c36496f33a504f
parentb02d87936b3bc80a5130b3d359a7128c6155bf1a (diff)
downloadffmpeg-fb5518cfb76af414a46366f74bffb5874bf3bfc4.tar.gz
Force one stream in caf muxer.
Based on eeb975f5
-rw-r--r--libavformat/cafenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index cd3a0be907..ae36b85cb1 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -108,6 +108,11 @@ static int caf_write_header(AVFormatContext *s)
unsigned int codec_tag = ff_codec_get_tag(ff_codec_caf_tags, enc->codec_id);
int64_t chunk_size = 0;
+ if (s->nb_streams != 1) {
+ av_log(s, AV_LOG_ERROR, "CAF files have exactly one stream\n");
+ return AVERROR(EINVAL);
+ }
+
switch (enc->codec_id) {
case AV_CODEC_ID_AAC:
case AV_CODEC_ID_AC3: