File 0003-encoder-x264-really-drain.patch of Package vlc.9728
From 844d9c2ac6d9db65dba42fe38c5ccd14822d3c19 Mon Sep 17 00:00:00 2001
From: Francois Cartegnie <fcvlcdev@free.fr>
Date: Wed, 29 Aug 2018 14:38:20 +0200
Subject: [PATCH] encoder: x264: really drain
---
modules/codec/x264.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 0efd8020cf4..c5954cb904e 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -1501,7 +1501,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
x264_encoder_encode( p_sys->h, &nal, &i_nal, &pic, &pic );
} else {
- if( x264_encoder_delayed_frames( p_sys->h ) ) {
+ while( x264_encoder_delayed_frames( p_sys->h ) && i_nal == 0 ) {
x264_encoder_encode( p_sys->h, &nal, &i_nal, NULL, &pic );
}
}