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
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to