changeset 33189:e137435bb751

Attempt to support attachements without filename.
author reimar
date Fri, 22 Apr 2011 06:15:50 +0000
parents d5406d5a0aec
children 0220b3e9d5c5
files libmpdemux/demuxer.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Fri Apr 22 00:55:36 2011 +0000
+++ b/libmpdemux/demuxer.c	Fri Apr 22 06:15:50 2011 +0000
@@ -1527,7 +1527,7 @@
         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);