Skip to content

Commit

Permalink
don't re-use a decompressor after getting a CodecStateException
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Sep 6, 2024
1 parent 499b561 commit 97d1ac3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xpra/client/gui/window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from xpra.util.env import envint, envbool, first_time
from xpra.codecs.loader import get_codec
from xpra.codecs.video import getVideoHelper, VdictEntry, CodecSpec
from xpra.codecs.constants import TransientCodecException
from xpra.codecs.constants import TransientCodecException, CodecStateException
from xpra.common import Gravity, PaintCallbacks
from xpra.log import Logger

Expand Down Expand Up @@ -798,8 +798,11 @@ def restart(msg: str, *args) -> None:
except Exception as e:
log(f"failed to initialize decoder {decoder_spec.codec_type}: {e}")
raise

img = vd.decompress_image(img_data, options)
try:
img = vd.decompress_image(img_data, options)
except CodecStateException as e:
restart(str(e))
img = None
if not img:
if options.intget("delayed", 0) > 0:
# there are further frames queued up,
Expand Down

0 comments on commit 97d1ac3

Please sign in to comment.