Commit 97cc1b9c authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

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.
parent df7bb360
......@@ -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' */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment