From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jun 18 21:20:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4D7D10657EB for ; Thu, 18 Jun 2009 21:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 950B88FC1B for ; Thu, 18 Jun 2009 21:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ILK247003443 for ; Thu, 18 Jun 2009 21:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n5ILK2vl003442; Thu, 18 Jun 2009 21:20:02 GMT (envelope-from gnats) Resent-Date: Thu, 18 Jun 2009 21:20:02 GMT Resent-Message-Id: <200906182120.n5ILK2vl003442@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dennis Schneider Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B428B1065785 for ; Thu, 18 Jun 2009 21:17:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id A22768FC08 for ; Thu, 18 Jun 2009 21:17:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ILHbHQ083184 for ; Thu, 18 Jun 2009 21:17:37 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n5ILHbBn083183; Thu, 18 Jun 2009 21:17:37 GMT (envelope-from nobody) Message-Id: <200906182117.n5ILHbBn083183@www.freebsd.org> Date: Thu, 18 Jun 2009 21:17:37 GMT From: Dennis Schneider To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/135719: [patch] mplayer: Fix segfaults when playing FLVs X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 21:20:03 -0000 >Number: 135719 >Category: ports >Synopsis: [patch] mplayer: Fix segfaults when playing FLVs >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 18 21:20:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dennis Schneider >Release: CURRENT r194284 >Organization: >Environment: FreeBSD freebsd 8.0-CURRENT FreeBSD 8.0-CURRENT #85 r194284: Tue Jun 16 13:52:12 CEST 2009 root@freebsd:/usr/obj/usr/src/sys/GENERIC i386 >Description: Playing FLV videos, e.g. from youtube, results in mplayer segfaulting when the video is finished. This is maybe only happening when you enable malloc debugging. The problem: The wrong allocator function is used (duh). BTW, the current SVN version of mplayer is alsow working fine with this patch. >How-To-Repeat: - enable malloc debugging - download a video from youtube with youtube-dl - play it with mplayer - watch it segfault at the end >Fix: Install this as files/patch-libmpcodecs-vd_ffmpeg.c in multimedia/mplayer: --- libmpcodecs/vd_ffmpeg.c.old 2009-06-18 23:03:31.000000000 +0200 +++ libmpcodecs/vd_ffmpeg.c 2009-06-18 23:03:32.000000000 +0200 @@ -387,7 +387,7 @@ } /* Pass palette to codec */ if (sh->bih && (sh->bih->biBitCount <= 8)) { - avctx->palctrl = calloc(1,sizeof(AVPaletteControl)); + avctx->palctrl = av_malloc(sizeof(AVPaletteControl)); avctx->palctrl->palette_changed = 1; if (sh->bih->biSize-sizeof(BITMAPINFOHEADER)) /* Palette size in biSize */ >Release-Note: >Audit-Trail: >Unformatted: