Reuse codec_context on stream thread restart (#71942)

pull/71996/head
uvjustin 2022-05-17 11:52:48 +08:00 committed by GitHub
parent 3de31939d8
commit 0608506bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -395,6 +395,9 @@ class KeyFrameConverter:
This is run by the worker thread and will only be called once per worker.
"""
if self._codec_context:
return
# Keep import here so that we can import stream integration without installing reqs
# pylint: disable=import-outside-toplevel
from av import CodecContext