diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index 8a9d84017a..3919ee9219 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -309,6 +309,11 @@ static int rm_write_header(AVFormatContext *s) int n; AVCodecContext *codec; + if (s->nb_streams > 2) { + av_log(s, AV_LOG_ERROR, "At most 2 streams are currently supported for muxing in RM\n"); + return AVERROR_PATCHWELCOME; + } + for(n=0;nnb_streams;n++) { s->streams[n]->id = n; codec = s->streams[n]->codec;