Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2002 03:36:48 +0100 (CET)
From:      BOUWSMA Beery <freebsd-user@netscum.dyndns.dk>
To:        freebsd-ports@freebsd.org
Subject:   Re: problem with recent mpg123 port binary
Message-ID:  <200201060236.g062amT66348@beerswilling.netscum.dyndns.dk>

next in thread | raw e-mail | index | archive | help
[replies sent directly to me may timeout and bounce, since I'm not
 online as often as I should be, but I'll check the list archives]

arrrrgh.

I wrote:
> The port of audio/mpg123 now seems to bomb, at least when trying to
> play non-CBR files.  Test (-t) and stdout (-s) mode work fine, so
> the problem is only when attempting to play through an audio device.

Of course I left something out.  The binary only bombs when I
specify the `-b' flag, which is a habit for me that I no longer
think about it...


> it's when patch-audio.c is applied that a non-CBR mp3 causes the

This is still true -- I erroneously assumed that my non-CBR files
were the cause -- when `-b ...' is specified on the commandline.

There are a number of other issues with `-b' which I ran across
when trying to patch around a problem, in particular, coredumping
when failing to play files.  My hacks to `fix' that and a few
other sub-optimal things ended up in breaking other things, so.


As penance for my sins of omission, I include the following patch
that I came up that allows one to be able to play mp3 files that
are larger than 2GB (yes, I have one that I've just started listening
to now), which can be appropriately modified to be able to play mp3
files of arbitrary size...


--- readers.c-DIST	Thu Mar  4 12:03:49 1999
+++ /root/hacks/mpg123/readers.c	Thu Jan  3 21:36:47 2002
@@ -15,7 +19,7 @@
 #endif
 #endif
 
-static int get_fileinfo(struct reader *,char *buf);
+static unsigned long get_fileinfo(struct reader *,char *buf);
 
 
 /*******************************************************************
@@ -199,9 +203,9 @@
  * returns length of a file (if filept points to a file)
  * reads the last 128 bytes information into buffer
  */
-static int get_fileinfo(struct reader *rds,char *buf)
+static unsigned long get_fileinfo(struct reader *rds,char *buf)
 {
-	int len;
+	unsigned long len;
 
         if((len=lseek(rds->filept,0,SEEK_END)) < 0) {
                 return -1;
@@ -233,7 +237,7 @@
 
 static int mapped_init(struct reader *rds) 
 {
-	long len;
+	unsigned long len;
 	char buf[128];
 
 	len = get_fileinfo(rds,buf);




This is not guaranteed, since I haven't made it to the end of
the file yet to assure that nothing else blows up after a few
thousand minutes, but at least it plays, unlike before.  Actually,
there are a few other things needing tweaking, but very minor.

I have another patch that makes playing from some arbitary point
in an mp3 stream more reliable, hidden somewhere, but I'll have to
save that for my next crime against nature since it's not at hand.


Sorry.


thanks
barry bouwsma


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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