summaryrefslogtreecommitdiff
path: root/libavformat/dvenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/dvenc.c')
-rw-r--r--libavformat/dvenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 98faf06fb7..cd22e97684 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -300,9 +300,11 @@ DVMuxContext* dv_init_mux(AVFormatContext* s)
for (i=0; i<s->nb_streams; i++) {
switch (s->streams[i]->codec->codec_type) {
case CODEC_TYPE_VIDEO:
+ if (vst) return NULL;
vst = s->streams[i];
break;
case CODEC_TYPE_AUDIO:
+ if (c->n_ast > 1) return NULL;
c->ast[c->n_ast++] = s->streams[i];
break;
default: