Skip to content

Commit

Permalink
another pr
Browse files Browse the repository at this point in the history
  • Loading branch information
oldma3095 committed Dec 17, 2024
1 parent a24d493 commit 6750680
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions codec_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,3 @@ func goAstiavCodecContextGetFormat(cc *C.AVCodecContext, pfsCPtr *C.enum_AVPixel
// Callback
return C.enum_AVPixelFormat(c(pfs))
}

// https://ffmpeg.org/doxygen/7.0/structAVCodecContext.html#a3e5334a611a3e2a6a653805bb9e2d4d4
func (cc *CodecContext) MaxBFrames() int {
return int(cc.c.max_b_frames)
}

// https://ffmpeg.org/doxygen/7.0/structAVCodecContext.html#a3e5334a611a3e2a6a653805bb9e2d4d4
func (cc *CodecContext) SetMaxBFrames(n int) {
cc.c.max_b_frames = C.int(n)
}
2 changes: 0 additions & 2 deletions codec_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ func TestCodecContext(t *testing.T) {
cc4.SetTimeBase(NewRational(15, 1))
cc4.SetWidth(16)
cc4.SetExtraHardwareFrames(4)
cc4.SetMaxBFrames(1)
require.Equal(t, int64(1), cc4.BitRate())
require.True(t, cc4.ChannelLayout().Equal(ChannelLayout21))
require.Equal(t, NewCodecContextFlags(4), cc4.Flags())
Expand All @@ -122,7 +121,6 @@ func TestCodecContext(t *testing.T) {
require.Equal(t, NewRational(15, 1), cc4.TimeBase())
require.Equal(t, 16, cc4.Width())
require.Equal(t, 4, cc4.ExtraHardwareFrames())
require.Equal(t, 1, cc4.MaxBFrames())

cc5 := AllocCodecContext(nil)
require.NotNil(t, cc5)
Expand Down

0 comments on commit 6750680

Please sign in to comment.