Skip to content

Commit 1420491

Browse files
committed
open codec ctx
1 parent e082d10 commit 1420491

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

getstream/video/rtc/track_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ def _encode_frame_with_codec(self, frame: av.AudioFrame, codec_name: str) -> byt
870870
codec.sample_rate = frame.sample_rate
871871
# Set time_base to match sample rate (1/sample_rate)
872872
codec.time_base = fractions.Fraction(1, frame.sample_rate)
873+
codec.open()
873874

874875
# Encode the frame
875876
packets = codec.encode(frame)

0 commit comments

Comments
 (0)