[vlc-commits] codec: avcodec: drain only on real discontinuity

Francois Cartegnie git at videolan.org
Thu Jul 5 22:46:13 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul  5 22:45:27 2018 +0200| [eda6add483a3d789712bf649be8a034b290c4995] | committer: Francois Cartegnie

codec: avcodec: drain only on real discontinuity

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eda6add483a3d789712bf649be8a034b290c4995
---

 modules/codec/avcodec/video.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 4ca157217e..375b9d1b33 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1300,7 +1300,8 @@ static int DecodeVideo( decoder_t *p_dec, block_t *p_block )
         p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) )
     {
         /* Drain */
-        DecodeBlock( p_dec, NULL );
+        if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY )
+            DecodeBlock( p_dec, NULL );
         p_sys->i_late_frames = 0;
         p_sys->i_last_output_frame = -1;
         p_sys->framedrop = FRAMEDROP_NONE;



More information about the vlc-commits mailing list