Skip to content

Commit

Permalink
prevent crash when encoder initialization fails: don't flush encoder …
Browse files Browse the repository at this point in the history
…unless we have submitted frames

git-svn-id: https://xpra.org/svn/Xpra/trunk@6067 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 8, 2014
1 parent 8d9c2c9 commit a99ee0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xpra/codecs/nvenc/encoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ cdef class Encoder:


cdef cuda_clean(self):
if self.context!=NULL:
if self.context!=NULL and self.frames>0:
self.flushEncoder()
if self.inputHandle!=NULL and self.context!=NULL:
log("clean() unregistering CUDA output buffer input handle %#x", <unsigned long> self.inputHandle)
Expand Down

0 comments on commit a99ee0d

Please sign in to comment.