X-Git-Url: https://git.ao2.it/gst-aseq-appsrc.git/blobdiff_plain/536a560a52c2315d44a873ee140d2c4ea1b1494a..1964e092825b7d2fccb01cbe5064efc2cfd187d5:/gst-aseq-appsrc.c diff --git a/gst-aseq-appsrc.c b/gst-aseq-appsrc.c index d15ed6e..2fd617f 100644 --- a/gst-aseq-appsrc.c +++ b/gst-aseq-appsrc.c @@ -62,7 +62,7 @@ struct _App guint64 tick; }; -App s_app; +static App s_app; static int init_seq (App * app) @@ -186,8 +186,7 @@ push_buffer (App * app, gpointer data, guint size) GST_BUFFER_OFFSET (buffer) = time; GST_BUFFER_DURATION (buffer) = DEFAULT_TICK_PERIOD_MS * GST_MSECOND; - local_data = g_malloc (size); - memcpy (local_data, data, size); + local_data = g_memdup (data, size); gst_buffer_append_memory (buffer, gst_memory_new_wrapped (0, local_data, size, 0, size, local_data,