From 38f3b4d76e334e5bd1ea3a372649201c17181abf Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Sat, 28 Nov 2026 11:02:15 -0500 Subject: [PATCH] Fix #2526 --- av/dictionary.pxd | 2 -- av/dictionary.py | 7 ------- av/sidedata/sidedata.pxd | 2 -- av/sidedata/sidedata.py | 1 - 4 files changed, 12 deletions(-) diff --git a/av/dictionary.pxd b/av/dictionary.pxd index d1eb3c9d1..a6b0f6ba2 100644 --- a/av/dictionary.pxd +++ b/av/dictionary.pxd @@ -4,5 +4,3 @@ cimport libav as lib cdef class Dictionary: cdef lib.AVDictionary *ptr cpdef Dictionary copy(self) - -cdef Dictionary wrap_dictionary(lib.AVDictionary *input_) diff --git a/av/dictionary.py b/av/dictionary.py index 2b33707db..afdfe1a36 100644 --- a/av/dictionary.py +++ b/av/dictionary.py @@ -73,10 +73,3 @@ def update(self, other=(), /, **kwds): self[key] = value for key, value in kwds.items(): self[key] = value - - -@cython.cfunc -def wrap_dictionary(input_: cython.pointer[lib.AVDictionary]) -> Dictionary: - output: Dictionary = Dictionary() - output.ptr = input_ - return output diff --git a/av/sidedata/sidedata.pxd b/av/sidedata/sidedata.pxd index 87c7d73d7..125061fe9 100644 --- a/av/sidedata/sidedata.pxd +++ b/av/sidedata/sidedata.pxd @@ -1,14 +1,12 @@ cimport libav as lib from av.buffer cimport Buffer -from av.dictionary cimport Dictionary, wrap_dictionary from av.frame cimport Frame cdef class SideData(Buffer): cdef Frame frame cdef lib.AVFrameSideData *ptr - cdef Dictionary metadata cdef SideData wrap_side_data(Frame frame, int index) cdef int get_display_rotation(Frame frame) diff --git a/av/sidedata/sidedata.py b/av/sidedata/sidedata.py index 410b0f2f9..09374feed 100644 --- a/av/sidedata/sidedata.py +++ b/av/sidedata/sidedata.py @@ -101,7 +101,6 @@ def __cinit__(self, sentinel, frame: Frame, index: cython.int): raise RuntimeError("cannot manually instantiate SideData") self.frame = frame self.ptr = frame.ptr.side_data[index] - self.metadata = wrap_dictionary(self.ptr.metadata) @cython.cfunc def _buffer_size(self) -> cython.size_t: