[vlc-commits] [Git][videolan/vlc][master] avcodec: fix crash when AV1 hardware decoder fails
    Jean-Baptiste Kempf (@jbk) 
    gitlab at videolan.org
       
    Sat Oct 21 13:11:51 UTC 2023
    
    
  
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
fecebe15 by Steve Lhomme at 2023-10-21T12:59:13+00:00
avcodec: fix crash when AV1 hardware decoder fails
If InitVideoDecCommon() fails, it's already cleaning the decoder,
release the context and freeing p_sys.
We must not do anything and just return the error.
- - - - -
1 changed file:
- modules/codec/avcodec/video.c
Changes:
=====================================
modules/codec/avcodec/video.c
=====================================
@@ -771,7 +771,7 @@ int InitVideoHwDec( vlc_object_t *obj )
 
     int res = InitVideoDecCommon( p_dec );
     if (res != VLC_SUCCESS)
-        goto not_usable;
+        return res;
 
     const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(p_context->sw_pix_fmt);
 
@@ -782,7 +782,6 @@ int InitVideoHwDec( vlc_object_t *obj )
             return VLC_SUCCESS;
     }
 
-not_usable:
     EndVideoDec(obj);
     return VLC_EGENERIC;
 failed:
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fecebe158883b832076fb396ad671255865f61a4
-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fecebe158883b832076fb396ad671255865f61a4
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
    
    
More information about the vlc-commits
mailing list