From d68fd1cb6c05ea01e71c17e9b595d1e2175055c1 Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Tue, 5 Mar 2024 01:50:41 -0500 Subject: [PATCH] Yeah, we can just delete decode --- av/stream.pyi | 1 - av/stream.pyx | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/av/stream.pyi b/av/stream.pyi index 79555e0a0..ffe4f8722 100644 --- a/av/stream.pyi +++ b/av/stream.pyi @@ -33,4 +33,3 @@ class Stream: type: Literal["video", "audio", "data", "subtitle", "attachment"] def encode(self, frame: Frame | None = None) -> list[Packet]: ... - def decode(self, packet: Packet | None = None) -> list[Frame]: ... diff --git a/av/stream.pyx b/av/stream.pyx index 3f40f21d8..0ed3e50df 100644 --- a/av/stream.pyx +++ b/av/stream.pyx @@ -165,20 +165,6 @@ cdef class Stream: packet.ptr.stream_index = self.ptr.index return packets - def decode(self, packet=None): - """ - Decode a :class:`.Packet` and return a list of :class:`.AudioFrame` - or :class:`.VideoFrame`. - - :return: :class:`list` of :class:`.Frame` subclasses. - - .. seealso:: This is mostly a passthrough to :meth:`.CodecContext.decode`. - """ - if self.codec_context is None: - raise RuntimeError("Stream.decode requires a valid CodecContext") - - return self.codec_context.decode(packet) - cdef _get_side_data(self, lib.AVStream *stream): # Get DISPLAYMATRIX SideData from a lib.AVStream object. # Returns: tuple[int, dict[str, Any]]