[MPlayer-cvslog] r33276 - trunk/libmpdemux/demuxer.c

reimar subversion at mplayerhq.hu
Fri Apr 22 08:15:51 CEST 2011


Author: reimar
Date: Fri Apr 22 08:15:50 2011
New Revision: 33276

Log:
Attempt to support attachements without filename.

Modified:
   trunk/libmpdemux/demuxer.c

Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c	Fri Apr 22 02:55:36 2011	(r33275)
+++ trunk/libmpdemux/demuxer.c	Fri Apr 22 08:15:50 2011	(r33276)
@@ -1527,7 +1527,7 @@ int demuxer_add_attachment(demuxer_t *de
         demuxer->attachments = realloc(demuxer->attachments,
                 (demuxer->num_attachments + 32) * sizeof(demux_attachment_t));
 
-    demuxer->attachments[demuxer->num_attachments].name = strdup(name);
+    demuxer->attachments[demuxer->num_attachments].name = name ? strdup(name) : NULL;
     demuxer->attachments[demuxer->num_attachments].type = strdup(type);
     demuxer->attachments[demuxer->num_attachments].data = malloc(size);
     memcpy(demuxer->attachments[demuxer->num_attachments].data, data, size);


More information about the MPlayer-cvslog mailing list