From 32df7029fcefcd1da97cbb2f69ffd0d141e6e85e Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Fri, 20 Oct 2023 14:00:49 -0600 Subject: [PATCH] Add __set__ for dts in AVFrame --- av/frame.pyx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/av/frame.pyx b/av/frame.pyx index b98624cc5..352b68157 100644 --- a/av/frame.pyx +++ b/av/frame.pyx @@ -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.