Skip to content

Commit

Permalink
* only x264 has problems with flushing frame 0, don't penalize the ot…
Browse files Browse the repository at this point in the history
…hers

* fix flushing video encoder again: only do it if needed, call the correct method

git-svn-id: https://xpra.org/svn/Xpra/trunk@14397 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 4, 2016
1 parent 6f0e970 commit efb1d86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ def do_flush_video_encoder(self):
ve, csc, frame, x, y, scaled_size = flush_data
if self._video_encoder!=ve or ve.is_closed():
return
if frame==0:
if frame==0 and ve.get_type()=="x264":
#x264 has problems if we try to re-use a context after flushing the first IDR frame
self._video_encoder = None
ve.clean()
Expand Down Expand Up @@ -1742,7 +1742,8 @@ def do_flush_video_encoder(self):
packet = self.make_draw_packet(x, y, w, h, encoding, Compressed(encoding, data), 0, client_options)
self.queue_damage_packet(packet)
#check for more delayed frames since we want to support multiple b-frames:
self.flush_video_encoder(ve, csc, frame, x, y)
if not self.b_frame_flush_timer and client_options.get("delayed", 0)>0:
self.schedule_video_encoder_flush(ve, csc, frame, x, y, scaled_size)


def csc_image(self, image, width, height):
Expand Down

0 comments on commit efb1d86

Please sign in to comment.