Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2017 12:37:44 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r453111 - in head/multimedia/mpeg4ip: . files
Message-ID:  <201710291237.v9TCbip2054973@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Sun Oct 29 12:37:44 2017
New Revision: 453111
URL: https://svnweb.freebsd.org/changeset/ports/453111

Log:
  Un-break build with lame 3.100
  
  Details:
  In recent lame versions, the arrays samplerate_table and
  bitrate_table are internal and must be accessed by provided
  functions lame_get_bitrate() and lame_get_samplerate()

Added:
  head/multimedia/mpeg4ip/files/patch-server_mp4live_audio__lame.cpp   (contents, props changed)
Modified:
  head/multimedia/mpeg4ip/Makefile

Modified: head/multimedia/mpeg4ip/Makefile
==============================================================================
--- head/multimedia/mpeg4ip/Makefile	Sun Oct 29 12:35:06 2017	(r453110)
+++ head/multimedia/mpeg4ip/Makefile	Sun Oct 29 12:37:44 2017	(r453111)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mpeg4ip
 PORTVERSION=	1.6.1
-PORTREVISION=	35
+PORTREVISION=	36
 CATEGORIES=	multimedia audio ipv6 net
 MASTER_SITES=	LOCAL/ahze
 # http://sourceforge.net/forum/forum.php?thread_id=1839453&forum_id=59136

Added: head/multimedia/mpeg4ip/files/patch-server_mp4live_audio__lame.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/mpeg4ip/files/patch-server_mp4live_audio__lame.cpp	Sun Oct 29 12:37:44 2017	(r453111)
@@ -0,0 +1,34 @@
+--- server/mp4live/audio_lame.cpp.orig	2006-08-07 18:27:27 UTC
++++ server/mp4live/audio_lame.cpp
+@@ -38,7 +38,7 @@ static int get_mpeg_type_for_samplerate 
+ {
+   for (uint x = 0; x < 3; x++) {
+     for (uint y = 0; y < 4; y++) {
+-      if (samplerate_table[x][y] == sr) {
++      if (lame_get_samplerate(x,y) == sr) {
+ 	return x;
+       }
+     }
+@@ -61,7 +61,7 @@ static uint32_t *lame_bitrate_for_sample
+   lame_global_flags *lameParams;
+ 
+   for (iy = 0; iy < 16; iy++) {
+-    if (bitrate_table[ix][iy] > 0) {
++    if (lame_get_bitrate(ix,iy) > 0) {
+       lameParams = lame_init();
+       lame_set_num_channels(lameParams, chans);
+       lame_set_in_samplerate(lameParams, samplerate);
+@@ -70,11 +70,11 @@ static uint32_t *lame_bitrate_for_sample
+       lame_set_quality(lameParams,2);
+       lame_set_bWriteVbrTag(lameParams,0);
+       lame_set_brate(lameParams,
+-		     bitrate_table[ix][iy]);
++		     lame_get_bitrate(ix,iy));
+ 
+       if (lame_init_params(lameParams) != -1) {
+ 	if (lame_get_in_samplerate(lameParams) == lame_get_out_samplerate(lameParams)) {
+-	  ret[*ret_size] = bitrate_table[ix][iy] * 1000;
++	  ret[*ret_size] = lame_get_bitrate(ix,iy) * 1000;
+ 	  *ret_size = *ret_size + 1;
+ 	}
+       }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710291237.v9TCbip2054973>