aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-13 15:44:39 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-13 15:44:45 +0100
commit1d0995e3a59eb37509888cfc7c2b173fd3dbb4f7 (patch)
tree822849c4e7d30bc82d85d3a033b9781915a21680
parent47eb15b989a0bbeef6647ec97d9ee646cb8e901a (diff)
parentfb5518cfb76af414a46366f74bffb5874bf3bfc4 (diff)
downloadffmpeg-1d0995e3a59eb37509888cfc7c2b173fd3dbb4f7.tar.gz
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: Force one stream in caf muxer. Merged-by: Michael Niedermayer <michaelni@gmx.at>
-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: