[vlc-commits] [Git][videolan/vlc][3.0.x] avcodec: video: fix draining

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Jun 29 12:12:50 UTC 2026



Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
10d48758 by Zhao Zhili at 2026-06-29T13:53:35+02: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.

(cherry picked from commit ce5a4b18b10bbef5dfd8fcd2157b8a9a22671c55)

- - - - -


1 changed file:

- modules/codec/avcodec/video.c


Changes:

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



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/10d4875829e487caf5e3f439ae1361e16673c5d7
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list