From: John Stebbins Date: Fri, 15 Jun 2018 20:16:00 +0000 (-0700) Subject: muxavformat: fix crash on windows X-Git-Tag: 1.2.0~307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc2bba58a7cbfee26b3d9992df062392a82b09c3;p=handbrake muxavformat: fix crash on windows We allocate AVFormatContext.url, but libavformat frees it. So we must use an allocation function that is compatible with the free function used by libavformat. --- diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index d4f94356a..f8a0ab984 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -182,7 +182,7 @@ static int avformatInit( hb_mux_object_t * m ) hb_error("Could not guess output format %s", muxer_name); goto error; } - m->oc->url = strdup(job->file); + m->oc->url = av_strdup(job->file); ret = avio_open2(&m->oc->pb, job->file, AVIO_FLAG_WRITE, &m->oc->interrupt_callback, NULL); if( ret < 0 )