History

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).

Reimar Döffinger committed 14 years ago

Commit 755667e1 parent 370211f1 file · +5 −0Browse files

Unified · Split

libavformat/rmenc.c+5−0
@@ -309,6 +309,11 @@ static int rm_write_header(AVFormatContext *s) · 308 unmodified lines
309309 int n;
310310 AVCodecContext *codec;
311311
312+ if (s->nb_streams > 2) {
313+ av_log(s, AV_LOG_ERROR, "At most 2 streams are currently supported for muxing in RM\n");
314+ return AVERROR_PATCHWELCOME;
315+ }
316+
312317 for(n=0;n<s->nb_streams;n++) {
313318 s->streams[n]->id = n;
314319 codec = s->streams[n]->codec;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t