Check for input stream count.

burst
Icedream 2018-04-10 16:00:42 +02:00
parent 5243e8aec6
commit 67cf9afdd3
Signed by: icedream
GPG Key ID: C1D30A06E6490C14
1 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,10 @@ func Mux(muxer string, readers ...io.ReadCloser) (retval io.Reader) {
}
inputs[i] = input
if input.Ctx.StreamsCnt() > 1 {
err = errors.New("Too many streams found in input")
return
}
var stream *gmf.Stream
if stream, err = input.Ctx.GetStream(0); err != nil {