Skip to content

Commit

Permalink
OpenIOContext
Browse files Browse the repository at this point in the history
  • Loading branch information
oldma3095 committed Dec 11, 2024
1 parent 314f10a commit 27d143e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion class_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/remuxing/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
2 changes: 1 addition & 1 deletion examples/transcoding/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions format_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 27d143e

Please sign in to comment.