summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-04-25 18:39:54 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-04-26 09:44:40 +0300
commit97cc1b9c160860d659764f8de7cc2ccf5b04927f (patch)
tree58137751b39b2262b94ac66e8799705ee985446d
parentdf7bb360ac569cda00b81e2aa707699c140fad9d (diff)
downloadgst-libav-97cc1b9c160860d659764f8de7cc2ccf5b04927f.tar.gz
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
-rw-r--r--ext/libav/gstavcfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c
index a361994..a1863fd 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' */