Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/ui/Logic/VideoPlayers/Ffmpeg/FfmpegPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ private void VideoLoop()
var swsSourceFormat = AVPixelFormat.AV_PIX_FMT_NONE;
var outputWidth = 0;
var outputHeight = 0;
VideoFrame? lastDropped = null; // detached from the queue while seeking; must be returned on every exit

try
{
Expand All @@ -818,7 +819,6 @@ private void VideoLoop()
var serial = -1;
var dropUntil = -1.0;
var presentedForSerial = false;
VideoFrame? lastDropped = null; // kept so a target past the last picture still shows something

while (!_closing)
{
Expand Down Expand Up @@ -988,6 +988,8 @@ private void VideoLoop()
}
finally
{
_videoFrames.Return(lastDropped);

if (sws != null)
{
ffmpeg.sws_freeContext(sws);
Expand Down
Loading