File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,6 +278,20 @@ def has_b_frames(self):
278278 """
279279 return bool (self .ptr .has_b_frames )
280280
281+ @property
282+ def reorder_depth (self ):
283+ """Raw ``has_b_frames`` value from FFmpeg (int, not bool).
284+
285+ After :meth:`flush_buffers`, FFmpeg may reset the internal reorder
286+ heuristic. Set this to the known reorder depth *after* seeking to
287+ avoid dropped hierarchical B-frames.
288+ """
289+ return self .ptr .has_b_frames
290+
291+ @reorder_depth .setter
292+ def reorder_depth (self , value : cython .int ):
293+ self .ptr .has_b_frames = value
294+
281295 @property
282296 def coded_width (self ):
283297 """
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class VideoCodecContext(CodecContext):
1919 sample_aspect_ratio : Fraction | None
2020 display_aspect_ratio : Fraction | None
2121 has_b_frames : bool
22+ reorder_depth : int
2223 max_b_frames : int
2324 coded_width : int
2425 coded_height : int
You can’t perform that action at this time.
0 commit comments