Index: xpra/codecs/dec_avcodec/decoder.pyx =================================================================== --- xpra/codecs/dec_avcodec/decoder.pyx (revision 5105) +++ xpra/codecs/dec_avcodec/decoder.pyx (working copy) @@ -15,7 +15,6 @@ from xpra.codecs.codec_constants import get_subsampling_divs, get_colorspace_from_avutil_enum, RGB_FORMATS from xpra.codecs.image_wrapper import ImageWrapper -from xpra.util import AtomicInteger include "constants.pxi" @@ -64,7 +63,6 @@ uint8_t **data int *linesize int format - void *opaque ctypedef struct AVCodec: pass ctypedef struct AVCodecID: @@ -182,8 +180,6 @@ DECODERS = {} -frame_alloc_counter = AtomicInteger() - #these two functions convert pointers to longs #so we can use a context or frame as a dictionary key #NOTE: we can't simply use the "Frame" pointer as key @@ -199,7 +195,7 @@ cdef unsigned long get_frame_key(AVFrame *frame): cdef unsigned long frame_key assert frame!=NULL, "frame is not set!" - frame_key = frame.opaque + frame_key = frame.data[0] return frame_key cdef void clear_frame(AVFrame *frame): @@ -232,8 +228,7 @@ if ret==0: frame_wrapper = AVFrameWrapper() frame_wrapper.set_context(avctx, frame) - frame_key = frame_alloc_counter.increase() - frame.opaque = frame_key + frame_key = get_frame_key(frame) decoder.add_framewrapper(frame_wrapper, frame_key) #debug("avcodec_get_buffer(%s, %s) ret=%s, decoder=%s, frame pointer=%s", # hex( avctx), hex(frame_key), ret, decoder, hex(frame_key))