Commit 9a1ebc73 authored by Thomas Guillem's avatar Thomas Guillem

codec: videotoolbox: simplify draining

VTDecompressionSessionFinishDelayedFrames() is automatically called from
VTDecompressionSessionWaitForAsynchronousFrames().
parent efbdf5fb
......@@ -1381,14 +1381,7 @@ static void Drain(decoder_t *p_dec)
/* draining: return last pictures of the reordered queue */
if (p_sys->session)
{
OSStatus status =
VTDecompressionSessionFinishDelayedFrames(p_sys->session);
if (status == noErr)
VTDecompressionSessionWaitForAsynchronousFrames(p_sys->session);
else
msg_Warn(p_dec, "VTDecompressionSessionFinishDelayedFrames failed");
}
VTDecompressionSessionWaitForAsynchronousFrames(p_sys->session);
vlc_mutex_lock(&p_sys->lock);
DrainDPB(p_dec, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment