* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#include <vlc_playlist.h>
#include <vlc_meta.h>
ByteVector p_data_taglib; const char *p_data; int i_data;
psz_mime = p_apic->mimeType().toCString(true);
+
+ /* some old iTunes version not only sets incorrectly the mime type
+ * but also embeds incorrectly the image.
+ * Recent versions seem to behave correctly */
+ if( !strncmp( psz_mime, "PNG", 3 ) )
+ {
+ msg_Warn( p_demux,
+ "%s: Invalid picture embedded by broken iTunes version",
+ f.file()->name() );
+ break;
+ }
+
psz_description = p_apic->description().toCString(true);
psz_name = psz_description;
TAB_INIT( p_demux_meta->i_attachments, p_demux_meta->attachments );
p_attachment = vlc_input_attachment_New( psz_name, psz_mime,
psz_description, p_data, i_data );
+ free( p_data );
TAB_APPEND_CAST( (input_attachment_t**),
p_demux_meta->i_attachments, p_demux_meta->attachments,
{
demux_t *p_demux = (demux_t *)p_this;
demux_meta_t *p_demux_meta = (demux_meta_t*)p_demux->p_private;
- vlc_meta_t *p_meta = p_demux_meta->p_meta;
+ vlc_meta_t *p_meta;
TAB_INIT( p_demux_meta->i_attachments, p_demux_meta->attachments );
p_demux_meta->p_meta = NULL;