[vlc-commits] [Git][videolan/vlc][master] 2 commits: lib: do not crash in the marq module is absent (refs #26881)
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Fri May 20 07:27:43 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
63785ac6 by Rémi Denis-Courmont at 2022-05-20T07:05:58+00:00
lib: do not crash in the marq module is absent (refs #26881)
- - - - -
d1cab347 by Rémi Denis-Courmont at 2022-05-20T07:05:58+00:00
lib: do not crash in the logo module is absent (refs #26881)
- - - - -
1 changed file:
- lib/media_player.c
Changes:
=====================================
lib/media_player.c
=====================================
@@ -36,6 +36,7 @@
#include <vlc_vout.h>
#include <vlc_aout.h>
#include <vlc_actions.h>
+#include <vlc_modules.h>
#include "libvlc_internal.h"
#include "media_player_internal.h"
@@ -577,6 +578,7 @@ libvlc_media_player_t *
libvlc_media_player_new( libvlc_instance_t *instance )
{
libvlc_media_player_t * mp;
+ int doinherit;
assert(instance);
@@ -654,23 +656,25 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "osd", VLC_VAR_BOOL); // off
- var_Create (mp, "marq-marquee", VLC_VAR_STRING);
- var_Create (mp, "marq-color", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "marq-opacity", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "marq-position", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "marq-refresh", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "marq-size", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "marq-timeout", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "marq-x", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "marq-y", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
-
- var_Create (mp, "logo-file", VLC_VAR_STRING);
- var_Create (mp, "logo-x", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "logo-y", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "logo-delay", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "logo-repeat", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "logo-opacity", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
- var_Create (mp, "logo-position", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
+ doinherit = module_exists("marq") ? VLC_VAR_DOINHERIT : 0;
+ var_Create(mp, "marq-marquee", VLC_VAR_STRING);
+ var_Create(mp, "marq-color", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "marq-opacity", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "marq-position", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "marq-refresh", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "marq-size", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "marq-timeout", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "marq-x", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "marq-y", VLC_VAR_INTEGER | doinherit);
+
+ doinherit = module_exists("logo") ? VLC_VAR_DOINHERIT : 0;
+ var_Create(mp, "logo-file", VLC_VAR_STRING);
+ var_Create(mp, "logo-x", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "logo-y", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "logo-delay", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "logo-repeat", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "logo-opacity", VLC_VAR_INTEGER | doinherit);
+ var_Create(mp, "logo-position", VLC_VAR_INTEGER | doinherit);
var_Create (mp, "contrast", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
var_Create (mp, "brightness", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/739f285ed5290d49bfb28c1d71561dc4b798e711...d1cab3478894132797d48d2094d4aed2f333ab54
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/739f285ed5290d49bfb28c1d71561dc4b798e711...d1cab3478894132797d48d2094d4aed2f333ab54
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