diff --git a/bit_stream_filter_context.go b/bit_stream_filter_context.go index 05ed993..fc19273 100644 --- a/bit_stream_filter_context.go +++ b/bit_stream_filter_context.go @@ -93,3 +93,8 @@ func (bsfc *BitStreamFilterContext) SetInputTimeBase(r Rational) { func (bsfc *BitStreamFilterContext) InputCodecParameters() *CodecParameters { return newCodecParametersFromC(bsfc.c.par_in) } + +// https://ffmpeg.org/doxygen/7.0/structAVBSFContext.html#ab58f8c37eec197e0f30d17d60959a60d +func (bsfc *BitStreamFilterContext) OutputCodecParameters() *CodecParameters { + return newCodecParametersFromC(bsfc.c.par_out) +} diff --git a/bit_stream_filter_context_test.go b/bit_stream_filter_context_test.go index 2913841..da58bd2 100644 --- a/bit_stream_filter_context_test.go +++ b/bit_stream_filter_context_test.go @@ -29,7 +29,9 @@ func TestBitStreamFilterContext(t *testing.T) { require.NoError(t, cp1.Copy(bsfc.InputCodecParameters())) require.Equal(t, CodecIDH264, bsfc.InputCodecParameters().CodecID()) + require.Equal(t, CodecIDNone, bsfc.OutputCodecParameters().CodecID()) require.NoError(t, bsfc.Initialize()) + require.Equal(t, CodecIDH264, bsfc.OutputCodecParameters().CodecID()) // TODO Test SendPacket // TODO Test ReceivePacket