[vlc-devel] commit: Actually initialize media_list_player ( Rémi Denis-Courmont )

Pierre d'Herbemont pdherbemont at free.fr
Thu May 21 23:42:14 CEST 2009


On Thu, May 21, 2009 at 1:25 PM, git version control <git at videolan.org> wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 21 22:36:31 2009 +0300| [7b4ce76a13a8000c3fffb9c1d2c05a2f70fb2dcf] | committer: Rémi Denis-Courmont
>
> Actually initialize media_list_player
>
> I guess nobody ever tried to use that piece of code.

> N.B.: dose not apply to bugfix due to earlier non-backported bugfixes
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7b4ce76a13a8000c3fffb9c1d2c05a2f70fb2dcf
> ---
>
>  src/control/libvlc_internal.h   |    2 +-
>  src/control/media_list_player.c |    8 ++++++--
>  test/Makefile.am                |    6 ++++++
>  3 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h
> index ada07d0..58d4397 100644
> --- a/src/control/libvlc_internal.h
> +++ b/src/control/libvlc_internal.h
> @@ -168,7 +168,7 @@ struct libvlc_media_list_player_t
>  {
>     libvlc_event_manager_t *    p_event_manager;
>     libvlc_instance_t *         p_libvlc_instance;
> -    int                         i_refcount;
> +    unsigned                    i_refcount;
>     vlc_mutex_t                 object_lock;
>     libvlc_media_list_path_t    current_playing_item_path;
>     libvlc_media_t *            p_current_playing_item;
> diff --git a/src/control/media_list_player.c b/src/control/media_list_player.c
> index d5865d9..fd9f2c2 100644
> --- a/src/control/media_list_player.c
> +++ b/src/control/media_list_player.c
> @@ -264,10 +264,13 @@ libvlc_media_list_player_new( libvlc_instance_t * p_instance,
>     if( !p_mlp )
>         return NULL;
>
> +    libvlc_retain( p_instance );
> +    p_mlp->p_libvlc_instance = p_instance;
> +    p_mlp->i_refcount = 0;

Refcount shall be 1, not 0.

Happy to see you giving an hand.

Pierre.



More information about the vlc-devel mailing list