vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Thu Jul 23 21:31:50 2015 +0300| [c34114a5294eeedc8f7f25b8a032b4d4d5e719e5] | committer: Rémi Denis-Courmont
access: remove access_GetParentInput() If there is a parent input, it cannot go away. There was no point in reference counting. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c34114a5294eeedc8f7f25b8a032b4d4d5e719e5 --- include/vlc_access.h | 6 ------ modules/access/attachment.c | 4 +--- modules/access/cdda.c | 4 +--- modules/access/http.c | 9 +++------ modules/access/mms/mmsh.c | 3 +-- modules/access/vcdx/access.c | 5 +---- src/input/access.c | 8 -------- src/libvlccore.sym | 1 - 8 files changed, 7 insertions(+), 33 deletions(-) diff --git a/include/vlc_access.h b/include/vlc_access.h index 08726b1..281497a 100644 --- a/include/vlc_access.h +++ b/include/vlc_access.h @@ -253,12 +253,6 @@ static inline void access_InitFields( access_t *p_a ) } /** - * This function will return the parent input of this access. - * It is retained. It can return NULL. - */ -VLC_API input_thread_t * access_GetParentInput( access_t *p_access ) VLC_USED; - -/** * Default pf_control callback for directory accesses. */ VLC_API int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va_list args ); diff --git a/modules/access/attachment.c b/modules/access/attachment.c index 9417511..b224cd6 100644 --- a/modules/access/attachment.c +++ b/modules/access/attachment.c @@ -68,7 +68,7 @@ static int Open(vlc_object_t *object) access_t *access = (access_t *)object; access_sys_t *sys; - input_thread_t *input = access_GetParentInput(access); + input_thread_t *input = access->p_input; if (!input) return VLC_EGENERIC; @@ -76,8 +76,6 @@ static int Open(vlc_object_t *object) if (input_Control(input, INPUT_GET_ATTACHMENT, &a, access->psz_location)) a = NULL; - vlc_object_release(input); - if (!a) { msg_Err(access, "Failed to find the attachment '%s'", access->psz_location); diff --git a/modules/access/cdda.c b/modules/access/cdda.c index 8202619..88b9c86 100644 --- a/modules/access/cdda.c +++ b/modules/access/cdda.c @@ -174,7 +174,7 @@ static int Open( vlc_object_t *p_this ) if( p_sys->i_track < 0 ) { /* We only do separate items if the whole disc is requested */ - input_thread_t *p_input = access_GetParentInput( p_access ); + input_thread_t *p_input = p_access->p_input; int i_ret = -1; if( p_input ) @@ -182,8 +182,6 @@ static int Open( vlc_object_t *p_this ) input_item_t *p_current = input_GetItem( p_input ); if( p_current ) i_ret = GetTracks( p_access, p_current ); - - vlc_object_release( p_input ); } if( i_ret < 0 ) goto error; diff --git a/modules/access/http.c b/modules/access/http.c index 195c59c..7a3e8a0 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -858,13 +858,12 @@ static int ReadICYMeta( access_t *p_access ) free( psz_tmp ); msg_Dbg( p_access, "New Icy-Title=%s", p_sys->psz_icy_title ); - input_thread_t *p_input = access_GetParentInput( p_access ); + input_thread_t *p_input = p_access->p_input; if( p_input ) { input_item_t *p_input_item = input_GetItem( p_access->p_input ); if( p_input_item ) input_item_SetMeta( p_input_item, vlc_meta_NowPlaying, p_sys->psz_icy_title ); - vlc_object_release( p_input ); } } } @@ -1452,13 +1451,12 @@ static int Request( access_t *p_access, uint64_t i_tell ) else resolve_xml_special_chars( p_sys->psz_icy_name ); msg_Dbg( p_access, "Icy-Name: %s", p_sys->psz_icy_name ); - input_thread_t *p_input = access_GetParentInput( p_access ); + input_thread_t *p_input = p_access->p_input; if ( p_input ) { input_item_t *p_input_item = input_GetItem( p_access->p_input ); if ( p_input_item ) input_item_SetMeta( p_input_item, vlc_meta_Title, p_sys->psz_icy_name ); - vlc_object_release( p_input ); } p_sys->b_icecast = true; /* be on the safeside. set it here as well. */ @@ -1475,13 +1473,12 @@ static int Request( access_t *p_access, uint64_t i_tell ) else resolve_xml_special_chars( p_sys->psz_icy_genre ); msg_Dbg( p_access, "Icy-Genre: %s", p_sys->psz_icy_genre ); - input_thread_t *p_input = access_GetParentInput( p_access ); + input_thread_t *p_input = p_access->p_input; if( p_input ) { input_item_t *p_input_item = input_GetItem( p_access->p_input ); if( p_input_item ) input_item_SetMeta( p_input_item, vlc_meta_Genre, p_sys->psz_icy_genre ); - vlc_object_release( p_input ); } } else if( !strncasecmp( psz, "Icy-Notice", 10 ) ) diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c index 662bbfb..edf0608 100644 --- a/modules/access/mms/mmsh.c +++ b/modules/access/mms/mmsh.c @@ -154,7 +154,7 @@ int MMSHOpen( access_t *p_access ) { msg_Dbg( p_access, "redirection to %s", psz_location ); - input_thread_t * p_input = access_GetParentInput( p_access ); + input_thread_t * p_input = p_access->p_input; input_item_t * p_new_loc; if( !p_input ) @@ -168,7 +168,6 @@ int MMSHOpen( access_t *p_access ) input_item_PostSubItem( p_item, p_new_loc ); vlc_gc_decref( p_new_loc ); - vlc_object_release( p_input ); free( psz_location ); diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c index fda6599..c643927 100644 --- a/modules/access/vcdx/access.c +++ b/modules/access/vcdx/access.c @@ -882,7 +882,7 @@ VCDOpen ( vlc_object_t *p_this ) "-track-length" ); p_vcdplayer->in_still = false; p_vcdplayer->play_item.type = VCDINFO_ITEM_TYPE_NOTFOUND; - p_vcdplayer->p_input = access_GetParentInput( p_access ); + p_vcdplayer->p_input = p_access->p_input; // p_vcdplayer->p_meta = vlc_meta_New(); p_vcdplayer->p_segments = NULL; p_vcdplayer->p_entries = NULL; @@ -950,7 +950,6 @@ VCDOpen ( vlc_object_t *p_this ) return VLC_SUCCESS; err_exit: - if( p_vcdplayer->p_input ) vlc_object_release( p_vcdplayer->p_input ); free( psz_source ); free( p_vcdplayer->psz_source ); free( p_vcdplayer ); @@ -977,8 +976,6 @@ VCDClose ( vlc_object_t *p_this ) vcdinfo_close( p_vcdplayer->vcd ); - if( p_vcdplayer->p_input ) vlc_object_release( p_vcdplayer->p_input ); - FREENULL( p_vcdplayer->p_entries ); FREENULL( p_vcdplayer->p_segments ); FREENULL( p_vcdplayer->psz_source ); diff --git a/src/input/access.c b/src/input/access.c index a3174ca..51b0d00 100644 --- a/src/input/access.c +++ b/src/input/access.c @@ -133,14 +133,6 @@ void vlc_access_Delete(access_t *access) } /***************************************************************************** - * access_GetParentInput: - *****************************************************************************/ -input_thread_t * access_GetParentInput( access_t *p_access ) -{ - return p_access->p_input ? vlc_object_hold((vlc_object_t *)p_access->p_input) : NULL; -} - -/***************************************************************************** * access_vaDirectoryControlHelper: *****************************************************************************/ int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va_list args ) diff --git a/src/libvlccore.sym b/src/libvlccore.sym index 82b09e0..abe4be2 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -1,4 +1,3 @@ -access_GetParentInput access_vaDirectoryControlHelper vlc_access_NewMRL vlc_access_Delete _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits