Skip to content

Commit

Permalink
Add __set__ for dts in AVFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
daveisfera committed Nov 1, 2023
1 parent 28d574f commit 32df702
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions av/frame.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ cdef class Frame:
return None
return self.ptr.pkt_dts

def __set__(self, value):
if value is None:
self.ptr.pkt_dts = lib.AV_NOPTS_VALUE
else:
self.ptr.pkt_dts = value

property pts:
"""
The presentation timestamp in :attr:`time_base` units for this frame.
Expand Down

0 comments on commit 32df702

Please sign in to comment.