Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
427d73cd
Commit
427d73cd
authored
Jan 16, 2010
by
Pierre
Browse files
libvlc: Don't request art if it was already asked before.
parent
ad338835
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/control/media.c
View file @
427d73cd
...
...
@@ -252,7 +252,7 @@ libvlc_media_t * libvlc_media_new_from_input_item(
return
NULL
;
}
p_md
=
m
alloc
(
sizeof
(
libvlc_media_t
)
);
p_md
=
c
alloc
(
sizeof
(
libvlc_media_t
)
,
1
);
if
(
!
p_md
)
{
libvlc_exception_raise
(
p_e
);
...
...
@@ -262,9 +262,7 @@ libvlc_media_t * libvlc_media_new_from_input_item(
p_md
->
p_libvlc_instance
=
p_instance
;
p_md
->
p_input_item
=
p_input_item
;
p_md
->
b_preparsed
=
false
;
p_md
->
i_refcount
=
1
;
p_md
->
p_user_data
=
NULL
;
p_md
->
state
=
libvlc_NothingSpecial
;
...
...
@@ -453,8 +451,9 @@ char *libvlc_media_get_meta( libvlc_media_t *p_md, libvlc_meta_t e_meta )
psz_meta
=
input_item_GetMeta
(
p_md
->
p_input_item
,
libvlc_to_vlc_meta
[
e_meta
]
);
if
(
e_meta
==
libvlc_meta_ArtworkURL
&&
!
psz_meta
)
if
(
e_meta
==
libvlc_meta_ArtworkURL
&&
!
psz_meta
&&
!
p_md
->
has_asked_art
)
{
p_md
->
has_asked_art
=
true
;
playlist_AskForArtEnqueue
(
libvlc_priv
(
p_md
->
p_libvlc_instance
->
p_libvlc_int
)
->
p_playlist
,
p_md
->
p_input_item
,
pl_Unlocked
);
...
...
src/control/media_internal.h
View file @
427d73cd
...
...
@@ -41,6 +41,7 @@ struct libvlc_media_t
libvlc_state_t
state
;
VLC_FORWARD_DECLARE_OBJECT
(
libvlc_media_list_t
*
)
p_subitems
;
/* A media descriptor can have Sub items. This is the only dependancy we really have on media_list */
void
*
p_user_data
;
bool
has_asked_art
;
};
/* Media Descriptor */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment