[vlc-commits] MKV: correctly set the attachment:// URL for embedded covers
Jean-Baptiste Kempf
git at videolan.org
Fri Feb 17 00:57:03 CET 2012
vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb 16 16:51:42 2012 +0100| [82722e41e05d15c2f2cc20f1b59919caddb3dc44] | committer: Jean-Baptiste Kempf
MKV: correctly set the attachment:// URL for embedded covers
(cherry picked from commit c3119df28b2b90248efed5ee09c5cf6f9bf26bfc)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=82722e41e05d15c2f2cc20f1b59919caddb3dc44
---
modules/demux/mkv/matroska_segment_parse.cpp | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 4ad9e68..0466d94 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1008,6 +1008,17 @@ void matroska_segment_c::ParseAttachments( KaxAttachments *attachments )
{
memcpy( new_attachment->p_data, img_data.GetBuffer(), img_data.GetSize() );
sys.stored_attachments.push_back( new_attachment );
+ if( !strncmp( new_attachment->mimeType(), "image/", 6 ) )
+ {
+ char *psz_url;
+ if( asprintf( &psz_url, "attachment://%s",
+ new_attachment->fileName() ) == -1 )
+ continue;
+ if( !sys.meta )
+ sys.meta = vlc_meta_New();
+ vlc_meta_SetArtURL( sys.meta, psz_url );
+ free( psz_url );
+ }
}
else
{
More information about the vlc-commits
mailing list