[vlc-commits] taglib: add missing vlc_input_attachment_New() error handling
Thomas Guillem
git at videolan.org
Tue Aug 18 10:55:28 CEST 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Aug 18 10:51:40 2015 +0200| [32ac3576112da542e47bef9f5213aa9377bd893a] | committer: Thomas Guillem
taglib: add missing vlc_input_attachment_New() error handling
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32ac3576112da542e47bef9f5213aa9377bd893a
---
modules/meta_engine/taglib.cpp | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 01846ef..ad37d32 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -654,10 +654,13 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta_t *p_demux_meta, vlc_meta
input_attachment_t *p_attachment =
vlc_input_attachment_New( "cover", psz_format, "cover",
list[0].data().data(), list[0].data().size() );
- TAB_APPEND_CAST( (input_attachment_t**),
- p_demux_meta->i_attachments, p_demux_meta->attachments,
- p_attachment );
- vlc_meta_SetArtURL( p_meta, "attachment://cover" );
+ if( p_attachment )
+ {
+ TAB_APPEND_CAST( (input_attachment_t**),
+ p_demux_meta->i_attachments, p_demux_meta->attachments,
+ p_attachment );
+ vlc_meta_SetArtURL( p_meta, "attachment://cover" );
+ }
}
}
#endif
More information about the vlc-commits
mailing list