[vlc-commits] [Git][videolan/vlc][master] avcodec: video: fix draining

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Thu Oct 21 09:33:20 UTC 2021



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
ce5a4b18 by Zhao Zhili at 2021-10-21T09:18:20+00:00
avcodec: video: fix draining

A codec which doesn't set AV_CODEC_CAP_DELAY but has the capability
of multi-threads decoding still needs to be drained by an empty
packet. According to the document, it's safe to pass NULL data to
libavcodec decode function, libavcodec will not pass it along to the
codec unless AV_CODEC_CAP_DELAY is set.

- - - - -


1 changed file:

- modules/codec/avcodec/video.c


Changes:

=====================================
modules/codec/avcodec/video.c
=====================================
@@ -913,9 +913,6 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         }
     }
 
-    if(!p_block && !(p_sys->p_codec->capabilities & AV_CODEC_CAP_DELAY) )
-        return VLCDEC_SUCCESS;
-
     if( !avcodec_is_open( p_context ) )
     {
         if( p_block )



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ce5a4b18b10bbef5dfd8fcd2157b8a9a22671c55

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ce5a4b18b10bbef5dfd8fcd2157b8a9a22671c55
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list