diff --git a/class_test.go b/class_test.go index d462407..58debed 100644 --- a/class_test.go +++ b/class_test.go @@ -48,7 +48,7 @@ func TestClassers(t *testing.T) { fmc2 := AllocFormatContext() require.NoError(t, fmc2.OpenInput("testdata/video.mp4", nil, nil)) path := filepath.Join(t.TempDir(), "iocontext.txt") - ic1, err := OpenIOContext(path, NewIOContextFlags(IOContextFlagWrite)) + ic1, err := OpenIOContext(path, NewIOContextFlags(IOContextFlagWrite), nil) require.NoError(t, err) defer os.RemoveAll(path) ic2, err := AllocIOContext(1, true, nil, nil, nil) diff --git a/examples/remuxing/main.go b/examples/remuxing/main.go index 9ea9713..f799707 100644 --- a/examples/remuxing/main.go +++ b/examples/remuxing/main.go @@ -103,7 +103,7 @@ func main() { // If this is a file, we need to use an io context if !outputFormatContext.OutputFormat().Flags().Has(astiav.IOFormatFlagNofile) { // Open io context - ioContext, err := astiav.OpenIOContext(*output, astiav.NewIOContextFlags(astiav.IOContextFlagWrite)) + ioContext, err := astiav.OpenIOContext(*output, astiav.NewIOContextFlags(astiav.IOContextFlagWrite), nil) if err != nil { log.Fatal(fmt.Errorf("main: opening io context failed: %w", err)) } diff --git a/examples/transcoding/main.go b/examples/transcoding/main.go index 3bf897d..0fea684 100644 --- a/examples/transcoding/main.go +++ b/examples/transcoding/main.go @@ -334,7 +334,7 @@ func openOutputFile() (err error) { if !outputFormatContext.OutputFormat().Flags().Has(astiav.IOFormatFlagNofile) { // Open io context var ioContext *astiav.IOContext - if ioContext, err = astiav.OpenIOContext(*output, astiav.NewIOContextFlags(astiav.IOContextFlagWrite)); err != nil { + if ioContext, err = astiav.OpenIOContext(*output, astiav.NewIOContextFlags(astiav.IOContextFlagWrite), nil); err != nil { err = fmt.Errorf("main: opening io context failed: %w", err) return } diff --git a/format_context_test.go b/format_context_test.go index f65f680..9f8ce6a 100644 --- a/format_context_test.go +++ b/format_context_test.go @@ -61,7 +61,7 @@ func TestFormatContext(t *testing.T) { fc3 := AllocFormatContext() require.NotNil(t, fc3) defer fc3.Free() - io, err := OpenIOContext("testdata/video.mp4", NewIOContextFlags(IOContextFlagRead)) + io, err := OpenIOContext("testdata/video.mp4", NewIOContextFlags(IOContextFlagRead), nil) require.NoError(t, err) defer io.Close() //nolint:errcheck fc3.SetPb(io) @@ -130,7 +130,7 @@ func TestFormatContext(t *testing.T) { require.NotNil(t, os) require.NoError(t, is.CodecParameters().Copy(os.CodecParameters())) } - ic, err := OpenIOContext(outputPath, NewIOContextFlags(IOContextFlagWrite)) + ic, err := OpenIOContext(outputPath, NewIOContextFlags(IOContextFlagWrite), nil) require.NoError(t, err) fc7.SetPb(ic) require.NoError(t, fc7.WriteHeader(nil))