[vlc-commits] meta: use INPUT_GET_ATTACHMENT control

Thomas Guillem git at videolan.org
Fri Jul 20 17:23:08 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jul 20 16:29:23 2018 +0200| [61adb4eec962811ced766f357460751b50075a0d] | committer: Thomas Guillem

meta: use INPUT_GET_ATTACHMENT control

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=61adb4eec962811ced766f357460751b50075a0d
---

 src/input/meta.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/input/meta.c b/src/input/meta.c
index 8eacaafc92..e9c8bab798 100644
--- a/src/input/meta.c
+++ b/src/input/meta.c
@@ -218,21 +218,7 @@ void input_ExtractAttachmentAndCacheArt( input_thread_t *p_input,
 
     /* */
     input_attachment_t *p_attachment = NULL;
-
-    vlc_mutex_lock( &p_item->lock );
-    for( int i_idx = 0; i_idx < input_priv(p_input)->i_attachment; i_idx++ )
-    {
-        input_attachment_t *a = input_priv(p_input)->attachment[i_idx];
-
-        if( !strcmp( a->psz_name, name ) )
-        {
-            p_attachment = vlc_input_attachment_Duplicate( a );
-            break;
-        }
-    }
-    vlc_mutex_unlock( &p_item->lock );
-
-    if( p_attachment == NULL )
+    if( input_Control( p_input, INPUT_GET_ATTACHMENT, &p_attachment, name ) )
     {
         msg_Warn( p_input, "art attachment %s not found", name );
         return;



More information about the vlc-commits mailing list