From 2f4258d6fc05ba948b1f6f60a786b306db32d1c0 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Sun, 28 Sep 2008 16:45:51 +0200 Subject: [PATCH] playlist: gc_date is private. --- include/vlc_playlist.h | 1 - src/playlist/engine.c | 10 +++++----- src/playlist/playlist_internal.h | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h index fed8239839..12f32efe8f 100644 --- a/include/vlc_playlist.h +++ b/include/vlc_playlist.h @@ -180,7 +180,6 @@ struct playlist_t /* Runtime */ int i_sort; /**< Last sorting applied to the playlist */ int i_order; /**< Last ordering applied to the playlist */ - mtime_t gc_date; }; /** Helper to add an item */ diff --git a/src/playlist/engine.c b/src/playlist/engine.c index 046521daf1..2129229320 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -82,7 +82,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent ) p_playlist->i_last_playlist_id = 0; pl_priv(p_playlist)->p_input = NULL; - p_playlist->gc_date = 0; + pl_priv(p_playlist)->gc_date = 0; pl_priv(p_playlist)->b_cant_sleep = false; ARRAY_INIT( p_playlist->items ); @@ -215,12 +215,12 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force ) { if( !b_force ) { - if( mdate() - p_playlist->gc_date < 1000000 ) + if( mdate() - pl_priv(p_playlist)->gc_date < 1000000 ) { pl_priv(p_playlist)->b_cant_sleep = true; return; } - else if( p_playlist->gc_date == 0 ) + else if( pl_priv(p_playlist)->gc_date == 0 ) return; } @@ -241,7 +241,7 @@ static void input_selected_stream_changed( const vlc_event_t * event, void * dat (void)event; playlist_t * p_playlist = data; PL_LOCK; - p_playlist->gc_date = mdate(); + pl_priv(p_playlist)->gc_date = mdate(); vlc_object_signal_unlocked( p_playlist ); PL_UNLOCK; } @@ -402,7 +402,7 @@ check_input: /* Destroy input */ playlist_release_current_input( p_playlist ); - p_playlist->gc_date = mdate(); + pl_priv(p_playlist)->gc_date = mdate(); pl_priv(p_playlist)->b_cant_sleep = true; i_activity= var_GetInteger( p_playlist, "activity" ); diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h index 3ea010f2f2..e9601a1549 100644 --- a/src/playlist/playlist_internal.h +++ b/src/playlist/playlist_internal.h @@ -105,6 +105,7 @@ typedef struct playlist_private_t bool b_doing_ml; /**< Doing media library stuff get quicker */ bool b_auto_preparse; bool b_cant_sleep; + mtime_t gc_date; } playlist_private_t; #define pl_priv( pl ) ((playlist_private_t *)(pl)) -- 2.39.2