Skip to content

Commit

Permalink
kodi: add temporary PR #9
Browse files Browse the repository at this point in the history
drop PR #7
  • Loading branch information
Portisch committed Feb 3, 2023
1 parent 64ac118 commit e9d1993
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.

This file was deleted.

@@ -0,0 +1,30 @@
From ca461e4b3729138677e89c2c0a338a6659527614 Mon Sep 17 00:00:00 2001
From: kszaq <737984+kszaq@users.noreply.github.com>
Date: Thu, 2 Feb 2023 19:39:03 +0100
Subject: [PATCH] AMLCodec: signal VC_FLUSHED if buffer gets empty

Normally, VideoPlayer should feed data to decoder
to keep TimeSize between 0.2 and 1.0. If for some
reason decoder is stuck/reset, buffer can starve
and this can lead to stutter. In this case, signal
VC_FLUSHED to allow VideoPlayer restart decoding
and rendering.
---
xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
index 214d9f68c4..654f2192a6 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
@@ -2533,6 +2533,10 @@ CDVDVideoCodec::VCReturn CAMLCodec::GetPicture(VideoPicture *pVideoPicture)
return CDVDVideoCodec::VC_ERROR;

float timesize(GetTimeSize());
+
+ if (!m_drain && timesize == 0.0f)
+ return CDVDVideoCodec::VC_FLUSHED;
+
if(!m_drain && timesize < 0.2f)
return CDVDVideoCodec::VC_BUFFER;

0 comments on commit e9d1993

Please sign in to comment.