Date: Thu, 18 Jun 2009 21:17:37 GMT From: Dennis Schneider <dschneid@informatik.hu-berlin.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/135719: [patch] mplayer: Fix segfaults when playing FLVs Message-ID: <200906182117.n5ILHbBn083183@www.freebsd.org> Resent-Message-ID: <200906182120.n5ILK2vl003442@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906182117.n5ILHbBn083183>