OSDN Git Service

pthread_frame: Unreference hw_frames_ctx on per-thread codec contexts
authorMark Thompson <sw@jkqxz.net>
Thu, 3 Nov 2016 00:13:35 +0000 (00:13 +0000)
committerMark Thompson <sw@jkqxz.net>
Thu, 10 Nov 2016 20:36:11 +0000 (20:36 +0000)
commitfd0fae60372cddbe0bec8830d07e760195f80bad
treeefa45930f135da8c940b5e2cd561db0f50375d6b
parent11623217e3c9b859daee544e31acdd0821b61039
pthread_frame: Unreference hw_frames_ctx on per-thread codec contexts

When decoding with threads enabled, the get_format callback will be
called with one of the per-thread codec contexts rather than with the
outer context.  If a hwaccel is in use too, this will add a reference
to the hardware frames context on that codec context, which will then
propagate to all of the other per-thread contexts for decoding.  Once
the decoder finishes, however, the per-thread contexts are not freed
normally, so these references leak.
libavcodec/pthread_frame.c