Made the video player shut down slightly faster under some circumstances.

This commit is contained in:
Leon Styhre 2021-11-12 23:48:12 +01:00
parent 1005dfcdb7
commit 36b7146d7f

View file

@ -264,7 +264,11 @@ void VideoFFmpegComponent::frameProcessing()
while (mIsPlaying && !mPause && videoFilter && (!mAudioCodecContext || audioFilter)) { while (mIsPlaying && !mPause && videoFilter && (!mAudioCodecContext || audioFilter)) {
readFrames(); readFrames();
if (!mIsPlaying)
break;
getProcessedFrames(); getProcessedFrames();
if (!mIsPlaying)
break;
outputFrames(); outputFrames();
// This 1 ms wait makes sure that the thread does not consume all available CPU cycles. // This 1 ms wait makes sure that the thread does not consume all available CPU cycles.