ports/135719: [patch] mplayer: Fix segfaults when playing FLVs

Dennis Schneider dschneid at informatik.hu-berlin.de
Thu Jun 18 21:20:03 UTC 2009


>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 at 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:



More information about the freebsd-ports-bugs mailing list