Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion av/frame.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions av/video/frame.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
10 changes: 5 additions & 5 deletions include/libavcodec/avcodec.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down