[vlc-devel] [PATCH 1/4] lib: media_player: release old media earlier

Thomas Guillem thomas at gllm.fr
Fri Sep 18 14:30:37 CEST 2020


Set superseded by
[PATCH 1/2] input_item: add a owner placeholder
[PATCH 2/2] lib: media_player: fix libvlc_MediaPlayerMediaChanged event


On Fri, Sep 18, 2020, at 10:14, Hugo Beauzée-Luyssen wrote:
> On Fri, Sep 18, 2020, at 10:10 AM, Thomas Guillem wrote:
> > 
> > 
> > On Fri, Sep 18, 2020, at 10:01, Hugo Beauzée-Luyssen wrote:
> > > On Fri, Sep 18, 2020, at 9:42 AM, Thomas Guillem wrote:
> > > > md or mp->p_md is not used after. No rick of race since mp->p_md is
> > > Risk*
> > > 
> > > > always written with the player lock held.
> > > > 
> > > > This fixes a potential null-dereference if the media was already set to
> > > > null and release by the user via libvlc_media_player_set_media().
> > > 
> > > Given than libvlc_media_release is checking for NULL media, I don't 
> > > understand the potential null-deref 
> > 
> > Indeed, but it's not usual having a _release() function checking for 
> > pointer nullity.
> > 
> 
> That's fair. I guess it makes more sense to release it when we know 
> there's something to release. The commit message probably should be 
> updated though
> 
> -- 
>   Hugo Beauzée-Luyssen
>   hugo at beauzee.fr
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list