Skip to content

Commit

Permalink
Remove deprecated Packet.decode_one
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Mar 3, 2024
1 parent 288db20 commit 4f758d1
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions av/packet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ from av.bytesource cimport bytesource
from av.error cimport err_check
from av.utils cimport avrational_to_fraction, to_avrational

from av import deprecation


cdef class Packet(Buffer):

Expand Down Expand Up @@ -81,19 +79,6 @@ cdef class Packet(Buffer):
"""
return self._stream.decode(self)

@deprecation.method
def decode_one(self):
"""
Send the packet's data to the decoder and return the first decoded frame.
Returns ``None`` if there is no frame.
.. warning:: This method is deprecated, as it silently discards any
other frames which were decoded.
"""
res = self._stream.decode(self)
return res[0] if res else None

@property
def stream_index(self):
return self.ptr.stream_index
Expand Down

0 comments on commit 4f758d1

Please sign in to comment.