Skip to content

Commit

Permalink
add warning if we think we're leaking framewrappers
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@4933 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 13, 2013
1 parent efde053 commit f7fb4bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xpra/codecs/dec_avcodec/decoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,8 @@ cdef class Decoder:
return <AVFrameWrapper> framewrapper

cdef add_framewrapper(self, AVFrameWrapper frame_wrapper, unsigned long frame_key):
if len(self.framewrappers)>50:
log.warn("too many frames kept in memory - dec_avcodec is probably leaking memory")
debug("add_framewrapper(%s, %s) known frame keys: %s", frame_wrapper, hex(frame_key),
[hex(x) for x in self.framewrappers.keys()])
self.framewrappers[int(frame_key)] = frame_wrapper
Expand Down

0 comments on commit f7fb4bd

Please sign in to comment.