From nobody@FreeBSD.org  Thu Jun 18 21:17:37 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B428B1065785
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <dschneid@informatik.hu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] mplayer: Fix segfaults when playing FLVs
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: riggs@rrr.de

>Number:         135719
>Category:       ports
>Synopsis:       [patch] multimedia/mplayer: Fix segfaults when playing FLVs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pgollucci
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 18 21:20:02 UTC 2009
>Closed-Date:    Fri Jul 17 18:35:15 UTC 2009
>Last-Modified:  Fri Jul 17 18:40:01 UTC 2009
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu Jun 18 22:02:41 UTC 2009 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135719 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: riggs@rrr.de
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/135719: [patch] multimedia/mplayer: Fix segfaults when playing FLVs
Date: Thu, 18 Jun 2009 22:02:39 UT

 Maintainer of multimedia/mplayer,
 
 Please note that PR ports/135719 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/135719
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Thomas Zander <riggs@rrr.de>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/135719: [patch] multimedia/mplayer: Fix segfaults when 
	playing FLVs
Date: Sun, 28 Jun 2009 17:03:12 +0200

 Yes, we should adopt this one. Please commit.
 
 Thanks,
 Riggs
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sun Jun 28 19:37:47 UTC 2009 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135719 
Responsible-Changed-From-To: freebsd-ports-bugs->pgollucci 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Fri Jul 17 00:48:57 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135719 
State-Changed-From-To: open->closed 
State-Changed-By: pgollucci 
State-Changed-When: Fri Jul 17 18:35:13 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135719 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/135719: commit references a PR
Date: Fri, 17 Jul 2009 18:35:03 +0000 (UTC)

 pgollucci    2009-07-17 18:34:49 UTC
 
   FreeBSD ports repository
 
   Modified files:
     multimedia/mplayer   Makefile 
   Added files:
     multimedia/mplayer/files patch-libmpcodecs__vd_ffmpeg.c 
   Log:
   - Playing FLV videos, e.g. from youtube, results in mplayer segfaulting when the video is finished.
   
   PR:             ports/135719
   Submitted by:   Dennis Schneider <dschneid@informatik.hu-berlin.de>
   Approved by:    maintainer
   
   Revision  Changes    Path
   1.187     +1 -1      ports/multimedia/mplayer/Makefile
   1.1       +11 -0     ports/multimedia/mplayer/files/patch-libmpcodecs__vd_ffmpeg.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
