[vlc-commits] [Git][videolan/vlc][master] vout/interlacing: don't inherit sout-deinterlace-mode

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Mar 11 07:02:20 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
26abe73e by Steve Lhomme at 2023-03-11T06:47:27+00:00
vout/interlacing: don't inherit sout-deinterlace-mode

We just release the inherited value and overwrite a new value.
This also fixes a crash if the software deinterlacer module is not found.

var_CreateGetString is just:
```
    var_Create( p_obj, psz_name, VLC_VAR_STRING | VLC_VAR_DOINHERIT );
    return var_GetString( p_obj, psz_name );
```

- - - - -


1 changed file:

- src/video_output/interlacing.c


Changes:

=====================================
src/video_output/interlacing.c
=====================================
@@ -79,14 +79,12 @@ static int DeinterlaceCallback(vlc_object_t *object, char const *cmd,
     }
 
     /* */
-    char *old = var_CreateGetString(vout, "sout-deinterlace-mode");
     var_SetString(vout, "sout-deinterlace-mode", mode);
 
     msg_Dbg(vout, "deinterlace %d, mode %s, is_needed %d", deinterlace_state, mode, is_needed);
     vout_ControlChangeInterlacing(vout, deinterlace_state != 0 && (is_needed || deinterlace_state >= 0));
 
     /* */
-    free(old);
     free(mode);
     return VLC_SUCCESS;
 }
@@ -145,6 +143,8 @@ void vout_InitInterlacingSupport(vout_thread_t *vout, vout_thread_private_t *sys
     var_SetInteger(vout, "deinterlace", deinterlace_state);
     free(deinterlace_mode);
 
+    var_Create(vout, "sout-deinterlace-mode", VLC_VAR_STRING);
+
     sys->interlacing.is_interlaced = false;
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/26abe73e4fefd9d625d18f16f81ff37d8674298b

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