[vlc-devel] [PATCH 5/7] video_output: also drop late pre-rendered pictures
Steve Lhomme
robux4 at ycbcr.xyz
Tue Oct 20 11:04:36 CEST 2020
The filter producing the drained pictures may be very slow and return pictures
too late.
---
src/video_output/video_output.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 96919d320db..d9e6d5ff690 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1106,10 +1106,17 @@ static picture_t *ThreadGetPrerenderedLocked(vout_thread_sys_t *vout, bool reuse
{
vout_thread_sys_t *sys = vout;
- picture_t *picture = filter_chain_VideoFilter(sys->filter.chain_static, NULL);
- assert(!reuse_decoded || !picture);
-
+ picture_t *picture = NULL;
while (!picture) {
+ picture = filter_chain_VideoFilter(sys->filter.chain_static, NULL);
+ if (picture && DropLate(vout, picture, can_drop_late, paused))
+ {
+ picture = NULL;
+ continue; // drain again
+ }
+ if (picture)
+ break;
+
picture_t *decoded;
if (reuse_decoded && sys->displayed.decoded) {
decoded = picture_Hold(sys->displayed.decoded);
--
2.26.2
More information about the vlc-devel
mailing list