[MPlayer-dev-eng] [PATCH]

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun Oct 21 18:31:15 CEST 2007


On Saturday, 20 October 2007 at 15:34, A Mennucc wrote:
> hi
> 
> recently I received a patch by Dann Frazier, as part of Debian bug
> 447278 ; the problem is in tremor, where  _vorbis_block_alloc()
> is used w/o proto in some code, and this will crash in ia64; details  in
>  http://wiki.debian.org/ImplicitPointerConversions
> 
> IMHO this patch may be applied to SVN as well
> 
> a.

> #! /bin/sh /usr/share/dpatch/dpatch-run
> ## 30vorbis-block-alloc.dpatch by dann frazier
> ##
> ## All lines beginning with `## DP:' are a description of the patch.
> ## DP: fix: _vorbis_block_alloc() implicitly converted to pointer

Here's a more complete patch that fixes another issue (missing #includes and
one more undeclared function).

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
--- MPlayer-20050228/tremor/res012.c.tre	2004-12-30 13:09:20.000000000 +0100
+++ MPlayer-20050228/tremor/res012.c	2005-02-28 04:01:07.000000000 +0100
@@ -22,6 +22,7 @@
 #include "codebook.h"
 #include "misc.h"
 #include "os.h"
+#include "block.h"
 
 typedef struct {
   vorbis_info_residue0 *info;
--- MPlayer-20050228/tremor/sharedbook.c.tre	2005-02-28 03:41:33.000000000 +0100
+++ MPlayer-20050228/tremor/sharedbook.c	2005-02-28 03:41:39.000000000 +0100
@@ -17,9 +17,9 @@
 #include <string.h>
 #include "ogg.h"
 #include "os.h"
-#include "misc.h"
 #include "ivorbiscodec.h"
 #include "codebook.h"
+#include "misc.h"
 
 /**** pack/unpack helpers ******************************************/
 int _ilog(unsigned int v){
--- MPlayer-20050228/tremor/synthesis.c.tre	2005-02-28 03:41:46.000000000 +0100
+++ MPlayer-20050228/tremor/synthesis.c	2005-02-28 04:01:28.000000000 +0100
@@ -14,12 +14,15 @@
  ********************************************************************/
 
 #include <stdio.h>
+#include <stdlib.h>
 #include "ogg.h"
 #include "ivorbiscodec.h"
 #include "codec_internal.h"
 #include "registry.h"
+#include "codebook.h"
 #include "misc.h"
 #include "os.h"
+#include "block.h"
 
 int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
   vorbis_dsp_state     *vd=vb->vd;
--- MPlayer-20050228/tremor/window.c.tre	2005-02-28 03:42:16.000000000 +0100
+++ MPlayer-20050228/tremor/window.c	2005-02-28 03:42:24.000000000 +0100
@@ -18,6 +18,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include "os.h"
+#include "codebook.h"
 #include "misc.h"
 #include "window.h"
 #include "window_lookup.h"
--- MPlayer-20050228/tremor/mdct.c.tre	2004-12-30 13:09:20.000000000 +0100
+++ MPlayer-20050228/tremor/mdct.c	2005-02-28 03:48:53.000000000 +0100
@@ -32,8 +32,10 @@
 
  ********************************************************************/
 
+#include <stdlib.h>
 #include "ivorbiscodec.h"
 #include "os.h"
+#include "codebook.h"
 #include "misc.h"
 #include "mdct.h"
 #include "mdct_lookup.h"
--- MPlayer-20050228/tremor/block.h.tre	2005-02-28 03:59:34.000000000 +0100
+++ MPlayer-20050228/tremor/block.h	2005-02-28 04:00:18.000000000 +0100
@@ -0,0 +1,24 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE.   *
+ *                                                                  *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: block functions
+
+ ********************************************************************/
+
+#ifndef _V_BLOCK_
+#define _V_BLOCK_
+
+extern void _vorbis_block_ripcord(vorbis_block *vb);
+extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
+
+#endif
--- MPlayer-20050228/tremor/floor1.c.tre	2004-12-30 13:09:20.000000000 +0100
+++ MPlayer-20050228/tremor/floor1.c	2005-02-28 04:01:57.000000000 +0100
@@ -24,6 +24,7 @@
 #include "registry.h"
 #include "codebook.h"
 #include "misc.h"
+#include "block.h"
 
 #define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */
 
--- MPlayer-20050228/tremor/mapping0.c.tre	2004-12-30 13:09:20.000000000 +0100
+++ MPlayer-20050228/tremor/mapping0.c	2005-02-28 03:55:39.000000000 +0100
@@ -18,9 +18,9 @@
 #include <math.h>
 #include "ogg.h"
 #include "ivorbiscodec.h"
+#include "codebook.h"
 #include "mdct.h"
 #include "codec_internal.h"
-#include "codebook.h"
 #include "window.h"
 #include "registry.h"
 #include "misc.h"
--- MPlayer-20050228/tremor/floor0.c.tre	2004-12-30 13:09:20.000000000 +0100
+++ MPlayer-20050228/tremor/floor0.c	2005-02-28 04:01:45.000000000 +0100
@@ -25,6 +25,7 @@
 #include "codebook.h"
 #include "misc.h"
 #include "os.h"
+#include "block.h"
 
 #define LSP_FRACBITS 14
 
--- MPlayer-20050228/tremor/registry.c.tre	2005-02-28 03:41:12.000000000 +0100
+++ MPlayer-20050228/tremor/registry.c	2005-02-28 03:49:03.000000000 +0100
@@ -12,9 +12,11 @@
 
  ********************************************************************/
 
+#include <stdlib.h>
 #include "ivorbiscodec.h"
 #include "codec_internal.h"
 #include "registry.h"
+#include "codebook.h"
 #include "misc.h"
 
 


More information about the MPlayer-dev-eng mailing list