From patchwork Thu Oct 8 12:45:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Degawa X-Patchwork-Id: 22753 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 5697F449212 for ; Thu, 8 Oct 2020 15:45:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2C0B368B873; Thu, 8 Oct 2020 15:45:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from degawa.com (unknown [174.127.109.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5D21068B814 for ; Thu, 8 Oct 2020 15:45:36 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomderp.com; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=O+XPjVyRQIt2fHI3adQ0XdhKrUWDXG8og1cUxZ0Rr6o=; b=t1r6LEpivvwyALtsnFU/+SYr4a Hfcc+DaLRVhKpn7Tg6M8q61oHBftyQDbT+ekkbJkhu9OGn/3pEiIyq/0jBSEgYVo6jcPCbk7opaU5 ACS1qLAH05t8zRxFUv8RlC9DT04pWiDqX30vrb6f+fhTzP+NDtfQfqjComhhnq1Zj1b9dXRAXAvHS h/B67iD8D1bT/ydoibgkZ6DQyFMRlUw9zbpxGRJxvc+S7/0bkb14mTFO1mG+XOLuYp8j2DhVxeHbH ywTzEN4zXxjtFPDXSvAcl6bTZWWPX4mfaBAKtQQtoXxg6WtBV9RatvNBSXELAbYB9/8aarlFF8nNj dUu6mAPA==; Received: from 108-216-168-194.lightspeed.mmphtn.sbcglobal.net ([108.216.168.194]:50408 helo=sv-kuri1.local) by slmp-550-1.slc.westdc.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kQVIc-003wtk-9V; Thu, 08 Oct 2020 06:45:34 -0600 From: Christopher Degawa To: ffmpeg-devel@ffmpeg.org Date: Thu, 8 Oct 2020 12:45:21 +0000 Message-Id: <20201008124521.4025534-1-ccom@randomderp.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - slmp-550-1.slc.westdc.net X-AntiAbuse: Original Domain - ffmpeg.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - randomderp.com X-Get-Message-Sender-Via: slmp-550-1.slc.westdc.net: authenticated_id: ccom/from_h X-Authenticated-Sender: slmp-550-1.slc.westdc.net: ccom@randomderp.com X-Source: X-Source-Args: X-Source-Dir: Subject: [FFmpeg-devel] [PATCH] libavformat/dashdec: Fix issue with dash on Windows X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Christopher Degawa Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Use xmlFree instead of av_freep snip from libxml2: * xmlGetProp: ... * Returns the attribute value or NULL if not found. * It's up to the caller to free the memory with xmlFree(). According to libxml2, you are supposed to use xmlFree instead of free on the pointer returned by it, and also using av_freep on Windows will call _aligned_free instead of normal free, causing _aligned_free to raise SIGTRAP and crashing ffmpeg and ffplay. To reproduce, download a build from gyan or BtBN for windows (also happens with some of Zeranoe's builds) https://www.gyan.dev/ffmpeg/builds/ https://github.com/BtbN/FFmpeg-Builds and run either ffplay.exe http://download.tsi.telecom-paristech.fr/gpac/DASH_CONFORMANCE/TelecomParisTech/mp4-live/mp4-live-mpd-AV-NBS.mpd or ffmpeg.exe -i http://download.tsi.telecom-paristech.fr/gpac/DASH_CONFORMANCE/TelecomParisTech/mp4-live/mp4-live-mpd-AV-NBS.mpd -f null - Signed-off-by: Christopher Degawa --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 99b9c45439..42ea74635b 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1145,7 +1145,7 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url, } err: - av_freep(&c->adaptionset_lang); + xmlFree(c->adaptionset_lang); return ret; }