[vlc-commits] libvlc: media: remove VLA
Thomas Guillem
git at videolan.org
Fri May 20 10:33:23 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri May 20 10:31:24 2016 +0200| [46f53fd7b613108bc88693af9dda920d226c1608] | committer: Thomas Guillem
libvlc: media: remove VLA
Since it's optional in C11 and not implemented in MSVC.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46f53fd7b613108bc88693af9dda920d226c1608
---
include/vlc/libvlc_media.h | 2 +-
lib/media.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index d05f642..d0aed42 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -286,9 +286,9 @@ typedef enum
*/
typedef struct
{
+ char * psz_uri;
libvlc_media_slave_type_t i_type;
unsigned int i_priority;
- char psz_uri[];
} libvlc_media_slave_t;
/**
diff --git a/lib/media.c b/lib/media.c
index 0b20aaa..74c9c3b 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -1189,6 +1189,7 @@ unsigned int libvlc_media_slaves_get( libvlc_media_t *p_md,
libvlc_media_slaves_release(pp_slaves, i);
return vlc_mutex_unlock( &p_input_item->lock ), 0;
}
+ p_slave->psz_uri = (char *) ((uint8_t *)p_slave) + sizeof(*p_slave);
strcpy( p_slave->psz_uri, p_item_slave->psz_uri );
switch( p_item_slave->i_type )
More information about the vlc-commits
mailing list