From 2027188c34698842c38b38f87f5560b08d7861dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 25 Apr 2016 18:39:54 +0300 Subject: [PATCH] avcfg: Use av_strdup() instead of g_strdup() for strings owned by ffmpeg It has its own allocator that depending on the configuration is incompatible with GLib's and just causes a segmentation fault. Like on Windows. https://bugzilla.gnome.org/show_bug.cgi?id=760266 --- ext/libav/gstavcfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c index a361994770..a1863fded7 100644 --- a/ext/libav/gstavcfg.c +++ b/ext/libav/gstavcfg.c @@ -1030,7 +1030,7 @@ gst_ffmpeg_cfg_fill_context (GstFFMpegVidEnc * ffmpegenc, /* make a copy for ffmpeg, it will likely free only some, * but in any case safer than a potential double free */ G_STRUCT_MEMBER (gchar *, context, context_offset) = - g_strdup (G_STRUCT_MEMBER (gchar *, ffmpegenc, qdata->offset)); + av_strdup (G_STRUCT_MEMBER (gchar *, ffmpegenc, qdata->offset)); } else { /* memcpy a bit heavy for a small copy, * but hardly part of 'inner loop' */