[vlc-commits] [Git][videolan/vlc][master] encoder: check encoder ops nullability

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Feb 20 14:17:03 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
21931db0 by Alaric Senat at 2022-02-20T13:57:07+00:00
encoder: check encoder ops nullability

`ops` being NULL is a possibility when encoder loading failed.

Fixes #26624

- - - - -


1 changed file:

- src/input/decoder_helpers.c


Changes:

=====================================
src/input/decoder_helpers.c
=====================================
@@ -304,7 +304,7 @@ vlc_decoder_device *vlc_encoder_GetDecoderDevice( encoder_t *enc )
 
 void vlc_encoder_Destroy(encoder_t *encoder)
 {
-    if (encoder->ops->close != NULL)
+    if (encoder->ops != NULL && encoder->ops->close != NULL)
         encoder->ops->close(encoder);
     if (encoder->p_module != NULL)
         module_unneed(encoder, encoder->p_module);



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/21931db0aa9b2771851bc5bb397b99b839be2ba2
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