[vlc-devel] [PATCH] lib: lock the player before updating the viewpoint

Thomas Guillem thomas at gllm.fr
Mon Apr 20 14:36:41 CEST 2020


Merged, thanks !

On Mon, Apr 20, 2020, at 12:22, Alexandre Janniaux wrote:
> Hi,
> 
> LGTM, the player need a locked access to the current input
> to apply the viewpoint, Thanks for noticing this!
> 
> Regards,
> --
> Alexandre Janniaux
> Videolabs
> 
> On Mon, Apr 20, 2020 at 10:51:26AM +0100, Mark Lee wrote:
> > ---
> >  lib/video.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/lib/video.c b/lib/video.c
> > index 6f8e6d7f59..4ab30e4d8b 100644
> > --- a/lib/video.c
> > +++ b/lib/video.c
> > @@ -274,8 +274,14 @@ int libvlc_video_update_viewpoint( libvlc_media_player_t *p_mi,
> >
> >      enum vlc_player_whence whence = b_absolute ? VLC_PLAYER_WHENCE_ABSOLUTE
> >                                                 : VLC_PLAYER_WHENCE_RELATIVE;
> > +
> > +    vlc_player_t *player = p_mi->player;
> > +    vlc_player_Lock(player);
> > +
> >      vlc_player_UpdateViewpoint(p_mi->player, &update, whence);
> >
> > +    vlc_player_Unlock(player);
> > +
> >      /* may not fail anymore, keep int not to break the API */
> >      return 0;
> >  }
> > --
> > 2.17.1
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> 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