Explicitly set AVFMT_FLAG_CUSTOM_IO.

burst
Icedream 2018-04-10 16:03:39 +02:00
parent 4d27d03a65
commit 6fe3925e18
Signed by: icedream
GPG Key ID: C1D30A06E6490C14
2 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,7 @@ func Demux(r io.ReadCloser) (demuxer *Demuxer) {
} }
defer avioCtx.Release() defer avioCtx.Release()
ctx.SetPb(avioCtx) ctx.SetPb(avioCtx)
ctx.SetFlag(0x0080) // AVFMT_FLAG_CUSTOM_IO
ctx.OpenInput("") ctx.OpenInput("")
// fmt.Println("=== FFMPEG DUMP OF INPUT ===") // fmt.Println("=== FFMPEG DUMP OF INPUT ===")

View File

@ -46,6 +46,7 @@ func Mux(muxer string, readers ...io.ReadCloser) (retval io.Reader) {
} }
defer output.AvioCtx.Release() defer output.AvioCtx.Release()
output.Ctx.SetPb(output.AvioCtx) output.Ctx.SetPb(output.AvioCtx)
output.Ctx.SetFlag(0x0080) // AVFMT_FLAG_CUSTOM_IO
inputs := make([]Instance, len(readers)) inputs := make([]Instance, len(readers))