Skip to content

Commit

Permalink
#3337 'jpeg' video encoders should not override non-video encoders
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 21, 2021
1 parent fe5f3e3 commit 41edbed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions xpra/server/window/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ def add_encoder(self, encoding, encoder):
self._all_encoders.setdefault(encoding, []).insert(0, encoder)
self._encoders[encoding] = encoder

def append_encoder(self, encoding, encoder):
log("append_encoder(%s, %s)", encoding, encoder)
self._all_encoders.setdefault(encoding, []).append(encoder)
if encoding not in self._encoders:
self._encoders[encoding] = encoder

def init_encoders(self):
self._all_encoders = {}
self._encoders = {}
Expand Down
2 changes: 1 addition & 1 deletion xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def init_encoders(self):
self.video_encodings = tuple(x for x in self.video_helper.get_encodings() if x in self.server_core_encodings)
video_enabled = []
for x in self.video_encodings:
self.add_encoder(x, self.video_encode)
self.append_encoder(x, self.video_encode)
video_enabled.append(x)
#video_encode() is used for more than just video encoders:
#(always enable it and let it fall through)
Expand Down

0 comments on commit 41edbed

Please sign in to comment.