Skip to content
Snippets Groups Projects
Commit bee2a18a authored by Thomas Guillem's avatar Thomas Guillem
Browse files

videotoolbox: fix frame leaks when closing decoder

Set b_vt_flush to true to prevent the asynchronous callback to enqueue more
frames.

This fixes a regression from f75db2e7.
parent e685db60
No related branches found
No related tags found
No related merge requests found
......@@ -1739,6 +1739,7 @@ static void Drain(decoder_t *p_dec, bool flush)
/* draining: return last pictures of the reordered queue */
vlc_mutex_lock(&p_sys->lock);
p_sys->b_vt_flush = true;
DrainDPBLocked(p_dec, flush);
vlc_mutex_unlock(&p_sys->lock);
......@@ -1746,6 +1747,7 @@ static void Drain(decoder_t *p_dec, bool flush)
VTDecompressionSessionWaitForAsynchronousFrames(p_sys->session);
vlc_mutex_lock(&p_sys->lock);
assert(RemoveOneFrameFromDPB(p_sys) == NULL);
p_sys->b_vt_flush = false;
p_sys->b_vt_feed = false;
vlc_mutex_unlock(&p_sys->lock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment