]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/cycle.c
Fix Metacube header handling with multiple header blocks.
[vlc] / modules / stream_out / cycle.c
index 51537d1420e07103a063af0e69f2620daa2c8b25..8465659d9b1e25250a36f43b37e9837727002b5e 100644 (file)
@@ -30,6 +30,7 @@
 #include <assert.h>
 #include <stdlib.h>
 
+#define VLC_MODULE_LICENSE VLC_LICENSE_GPL_2_PLUS
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_block.h>
@@ -69,7 +70,7 @@ static mtime_t get_dts(const block_t *block)
     return block->i_dts;
 }
 
-static sout_stream_id_sys_t *Add(sout_stream_t *stream, es_format_t *fmt)
+static sout_stream_id_sys_t *Add(sout_stream_t *stream, const es_format_t *fmt)
 {
     sout_stream_sys_t *sys = stream->p_sys;
     sout_stream_id_sys_t *id = malloc(sizeof (*id));
@@ -80,6 +81,7 @@ static sout_stream_id_sys_t *Add(sout_stream_t *stream, es_format_t *fmt)
 
     if (es_format_Copy(&id->fmt, fmt))
     {
+        es_format_Clean(&id->fmt);
         free(id);
         return NULL;
     }