diff --git a/av/frame.pyx b/av/frame.pyx index 1084ca45e..57681bbcd 100644 --- a/av/frame.pyx +++ b/av/frame.pyx @@ -139,7 +139,7 @@ cdef class Frame: Wraps :ffmpeg:`AVFrame.key_frame`. """ - return bool(self.ptr.key_frame) + return bool(self.ptr.flags & lib.AV_FRAME_FLAG_KEY) @property diff --git a/av/video/frame.pyx b/av/video/frame.pyx index bfc74c40a..e5cd523b5 100644 --- a/av/video/frame.pyx +++ b/av/video/frame.pyx @@ -177,12 +177,9 @@ cdef class VideoFrame(Frame): @property def interlaced_frame(self): - """Is this frame an interlaced or progressive? + """Is this frame an interlaced or progressive?""" - Wraps :ffmpeg:`AVFrame.interlaced_frame`. - - """ - return self.ptr.interlaced_frame + return bool(self.ptr.flags & lib.AV_FRAME_FLAG_INTERLACED) @property def pict_type(self): diff --git a/include/libavcodec/avcodec.pxd b/include/libavcodec/avcodec.pxd index 71121e976..d680e8b13 100644 --- a/include/libavcodec/avcodec.pxd +++ b/include/libavcodec/avcodec.pxd @@ -135,6 +135,9 @@ cdef extern from "libavcodec/avcodec.h" nogil: cdef enum: AV_FRAME_FLAG_CORRUPT + AV_FRAME_FLAG_KEY + AV_FRAME_FLAG_DISCARD + AV_FRAME_FLAG_INTERLACED cdef enum: FF_COMPLIANCE_VERY_STRICT @@ -368,19 +371,16 @@ cdef extern from "libavcodec/avcodec.h" nogil: uint8_t **extended_data int format # Should be AVPixelFormat or AVSampleFormat - int key_frame # 0 or 1. AVPictureType pict_type - int interlaced_frame # 0 or 1. - int width int height int nb_side_data AVFrameSideData **side_data - int nb_samples # Audio samples - int sample_rate # Audio Sample rate + int nb_samples + int sample_rate AVChannelLayout ch_layout