mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
rmenc: more than 2 streams are not currently possible.
It is possible that just extending the RMMuxContext.streams array would avoid it. It is also possible that two audio streams will fail to mux correctly as well, though at least it should not crash for this reason. I do not feel like checking either of these. This patch fixes trac issue #1022 (at least it makes it exit with a proper error message instead of crashing). Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
parent
370211f470
commit
755667eebc
@ -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;n<s->nb_streams;n++) {
|
||||
s->streams[n]->id = n;
|
||||
codec = s->streams[n]->codec;
|
||||
|
Loading…
Reference in New Issue
Block a user