Commit 01fa74ad authored by Reimar Döffinger's avatar Reimar Döffinger

DV muxer should not only fail for more that 3 streams altogether

but also if two of them are video or all three are audio.

Originally committed as revision 9403 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e46e884f
...@@ -300,9 +300,11 @@ DVMuxContext* dv_init_mux(AVFormatContext* s) ...@@ -300,9 +300,11 @@ DVMuxContext* dv_init_mux(AVFormatContext* s)
for (i=0; i<s->nb_streams; i++) { for (i=0; i<s->nb_streams; i++) {
switch (s->streams[i]->codec->codec_type) { switch (s->streams[i]->codec->codec_type) {
case CODEC_TYPE_VIDEO: case CODEC_TYPE_VIDEO:
if (vst) return NULL;
vst = s->streams[i]; vst = s->streams[i];
break; break;
case CODEC_TYPE_AUDIO: case CODEC_TYPE_AUDIO:
if (c->n_ast > 1) return NULL;
c->ast[c->n_ast++] = s->streams[i]; c->ast[c->n_ast++] = s->streams[i];
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment