Skip to content
Closed
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
16 changes: 16 additions & 0 deletions av/video/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ def pict_type(self):
def pict_type(self, value):
self.ptr.pict_type = value

@property
def key_frame(self):
return super().key_frame

@key_frame.setter
def key_frame(self, v):
if v is None:
return
if v:
self.ptr.flags |= lib.AV_FRAME_FLAG_KEY
self.pict_type = PictureType.I
else:
self.ptr.flags &= ~lib.AV_FRAME_FLAG_KEY
if self.pict_type == PictureType.I:
self.pict_type = PictureType.P

@property
def colorspace(self):
"""Colorspace of frame.
Expand Down
Loading