[vlc-devel] [PATCH] lua: player: remove incorrect const
Steve Lhomme
robux4 at ycbcr.xyz
Thu May 2 12:26:39 CEST 2019
On 5/2/2019 12:12 PM, Romain Vimont wrote:
> A title list can be held, so vlc_player_GetTitleList() returns a pointer
> to a non-const title list.
I haven't followed the whole player API changes, but if it can be held,
shouldn't it return a held pointer in the first place ? How long does
this pointer stay valid ?
> ---
> modules/lua/libs/input.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
> index c011f1d95f..ac69f1f7b7 100644
> --- a/modules/lua/libs/input.c
> +++ b/modules/lua/libs/input.c
> @@ -117,8 +117,7 @@ static int vlclua_player_get_titles_count(lua_State *L)
> vlc_player_t *player = vlclua_get_player_internal(L);
>
> vlc_player_Lock(player);
> - const struct vlc_player_title_list *titles =
> - vlc_player_GetTitleList(player);
> + struct vlc_player_title_list *titles = vlc_player_GetTitleList(player);
> size_t count = titles ? vlc_player_title_list_GetCount(titles) : 0;
> vlc_player_Unlock(player);
>
> --
> 2.20.1
>
> _______________________________________________
> 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