vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Fri Jan 18 22:24:31 2019 +0200| [4b6f1d7577a356b0ad5ce29d26f7b9f33b359329] | committer: Rémi Denis-Courmont
vout: call vout_Close() directly This removes vout_CloseAndRelease(). > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b6f1d7577a356b0ad5ce29d26f7b9f33b359329 --- src/audio_output/filters.c | 2 +- src/input/resource.c | 6 +++--- src/video_output/video_output.c | 4 ++-- src/video_output/vout_internal.h | 14 +------------- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c index ab2b2457f0..eea2dedb33 100644 --- a/src/audio_output/filters.c +++ b/src/audio_output/filters.c @@ -393,7 +393,7 @@ vout_thread_t *aout_filter_GetVout(filter_t *filter, const video_format_t *fmt) void aout_filter_PutVout(filter_t *filter, vout_thread_t *vout) { assert(vout->obj.parent == VLC_OBJECT(filter)); - vout_CloseAndRelease(vout); + vout_Close(vout); } static int AppendFilter(vlc_object_t *obj, const char *type, const char *name, diff --git a/src/input/resource.c b/src/input/resource.c index a56e5946ce..4be13f2973 100644 --- a/src/input/resource.c +++ b/src/input/resource.c @@ -145,7 +145,7 @@ static void DestroyVout( input_resource_t *p_resource ) assert( p_resource->i_vout == 0 ); if( p_resource->p_vout_free ) - vout_CloseAndRelease( p_resource->p_vout_free ); + vout_Close( p_resource->p_vout_free ); p_resource->p_vout_free = NULL; } @@ -440,7 +440,7 @@ void input_resource_PutVout(input_resource_t *p_resource, if (p_resource->p_vout_free != NULL || active_vouts > 0) { msg_Dbg(p_resource->p_parent, "destroying vout (already one saved or active)"); - vout_CloseAndRelease(vout); + vout_Close(vout); } else { vout_configuration_t cfg = { .vout = vout }; @@ -471,7 +471,7 @@ void input_resource_TerminateVout( input_resource_t *p_resource ) if (p_resource->p_vout_free != NULL) { msg_Dbg(p_resource->p_vout_free, "destroying useless vout"); - vout_CloseAndRelease(p_resource->p_vout_free); + vout_Close(p_resource->p_vout_free); p_resource->p_vout_free = NULL; } vlc_mutex_unlock(&p_resource->lock); diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 6e91c14ad7..853ed00619 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -211,7 +211,7 @@ static vout_thread_t *VoutCreate(vlc_object_t *object, if (vout->p->dead) { msg_Err(vout, "video output creation failed"); - vout_CloseAndRelease(vout); + vout_Close(vout); return NULL; } @@ -252,7 +252,7 @@ vout_thread_t *vout_Request(vlc_object_t *object, msg_Dbg(object, "reusing provided vout"); return vout; } - vout_CloseAndRelease(vout); + vout_Close(vout); msg_Warn(object, "cannot reuse provided vout"); } diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h index 66297c5385..21ae108c6c 100644 --- a/src/video_output/vout_internal.h +++ b/src/video_output/vout_internal.h @@ -154,8 +154,7 @@ struct vout_thread_sys_t * is possible, otherwise it returns NULL. * If cfg->vout is not used, it will be closed and released. * - * You can release the returned value either by vout_Request or vout_Close() - * followed by a vlc_object_release() or shorter vout_CloseAndRelease() + * You can release the returned value either by vout_Request() or vout_Close(). * * \param object a vlc object * \param cfg the video configuration requested. @@ -175,17 +174,6 @@ vout_thread_t * vout_Request( vlc_object_t *object, const vout_configuration_t * */ void vout_Close( vout_thread_t *p_vout ); -/** - * This function will close a vout created by vout_Create - * and then release it. - * - * \param p_vout the vout to close and release - */ -static inline void vout_CloseAndRelease( vout_thread_t *p_vout ) -{ - vout_Close( p_vout ); -} - /* TODO to move them to vlc_vout.h */ void vout_ControlChangeFullscreen(vout_thread_t *, const char *id); void vout_ControlChangeWindowed(vout_thread_t *); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
