[vlc-devel] [PATCH] avcodec: remove test that is always true

Steve Lhomme robux4 at videolabs.io
Tue Sep 5 11:56:09 CEST 2017


if there's no block we return false earlier
---
 modules/codec/avcodec/video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 676cf34d00..52a653981e 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -679,8 +679,7 @@ static bool check_block_being_late( decoder_sys_t *p_sys, block_t *block, mtime_
     if( current_time - p_sys->i_late_frames_start > (5*CLOCK_FREQ))
     {
         date_Set( &p_sys->pts, VLC_TS_INVALID ); /* To make sure we recover properly */
-        if( block )
-            block_Release( block );
+        block_Release( block );
         p_sys->i_late_frames--;
         return true;
     }
-- 
2.12.1



More information about the vlc-devel mailing list