File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ cdef class Frame:
139139 Wraps :ffmpeg:`AVFrame.key_frame`.
140140
141141 """
142- return bool (self .ptr.key_frame )
142+ return bool (self .ptr.flags & lib.AV_FRAME_FLAG_KEY )
143143
144144
145145 @property
Original file line number Diff line number Diff line change @@ -177,12 +177,9 @@ cdef class VideoFrame(Frame):
177177
178178 @property
179179 def interlaced_frame (self ):
180- """ Is this frame an interlaced or progressive?
180+ """ Is this frame an interlaced or progressive?"""
181181
182- Wraps :ffmpeg:`AVFrame.interlaced_frame`.
183-
184- """
185- return self .ptr.interlaced_frame
182+ return bool (self .ptr.flags & lib.AV_FRAME_FLAG_INTERLACED)
186183
187184 @property
188185 def pict_type (self ):
Original file line number Diff line number Diff line change @@ -135,6 +135,9 @@ cdef extern from "libavcodec/avcodec.h" nogil:
135135
136136 cdef enum :
137137 AV_FRAME_FLAG_CORRUPT
138+ AV_FRAME_FLAG_KEY
139+ AV_FRAME_FLAG_DISCARD
140+ AV_FRAME_FLAG_INTERLACED
138141
139142 cdef enum :
140143 FF_COMPLIANCE_VERY_STRICT
@@ -368,19 +371,16 @@ cdef extern from "libavcodec/avcodec.h" nogil:
368371 uint8_t ** extended_data
369372
370373 int format # Should be AVPixelFormat or AVSampleFormat
371- int key_frame # 0 or 1.
372374 AVPictureType pict_type
373375
374- int interlaced_frame # 0 or 1.
375-
376376 int width
377377 int height
378378
379379 int nb_side_data
380380 AVFrameSideData ** side_data
381381
382- int nb_samples # Audio samples
383- int sample_rate # Audio Sample rate
382+ int nb_samples
383+ int sample_rate
384384
385385 AVChannelLayout ch_layout
386386
You can’t perform that action at this time.
0 commit comments