We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf28973 commit 5fe3c40Copy full SHA for 5fe3c40
1 file changed
av/codec/context.py
@@ -462,6 +462,14 @@ def decode(self, packet: Packet | None = None):
462
you do not want the library to automatically re-order frames for you
463
(if they are encoded with a codec that has B-frames).
464
465
+ .. warning::
466
+
467
+ This method is **not thread-safe**. Calling :meth:`decode` concurrently
468
+ from multiple threads on the same :class:`CodecContext` will corrupt
469
+ internal FFmpeg state and likely cause a crash (segfault). FFmpeg 8.1
470
+ enforces this more strictly than earlier releases. If you need to decode
471
+ from multiple threads, give each thread its own :class:`CodecContext`.
472
473
"""
474
if not self.codec.ptr:
475
raise ValueError("cannot decode unknown codec")
0 commit comments