From: SourceForge.net <no...@so...> - 2008-10-26 18:09:08
|
Bugs item #1622653, was opened at 2006-12-26 18:40 Message generated for change (Comment added) made by cbagwell You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110706&aid=1622653&group_id=10706 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Chris Bagwell (cbagwell) Assigned to: Nobody/Anonymous (nobody) Summary: Piping of vorbis doesn't work on windows Initial Comment: The following patch was sent to me with a claim its required to get piping of vorbis files under windows. It would be nice if we could somehow pass ft_t to the callback function as the is_seekable flag is already stored and we could leave the fstat() logic only in stio.c; which already knows Window's issues. The following patch needs some work before inclusion (at least wrap if #if windows). --- vorbis.c 1 Oct 2005 20:02:03 -0000 1.20 +++ vorbis.c 11 Apr 2006 04:43:11 -0000 @@ -26,6 +26,9 @@ #include <math.h> #include <string.h> +#include <sys/types.h> +#include <sys/stat.h> + #include <ogg/ogg.h> #include <vorbis/codec.h> #include <vorbis/vorbisfile.h> @@ -73,7 +76,12 @@ /* Taken from vorbisfile.c in libvorbis source code */ static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){ - if(f==NULL)return(-1); + int filetype; + struct _stat st; + _fstat(f, &st); + filetype = st.st_mode & _S_IFMT; + + if ((f==NULL) || !(filetype == _S_IFREG)) return(-1); return fseek(f,(int)off,whence); } ---------------------------------------------------------------------- >Comment By: Chris Bagwell (cbagwell) Date: 2008-10-26 13:08 Message: I tried to reproduce this a few different ways with current CVS (as of todays update) and could not reproduce it. Therefore, I'll close this PTR. Tested: sox test.ogg -t ogg - trim 20 | sox -t ogg - -d Played fine and the trim should have triggerred seeking into the file. ---------------------------------------------------------------------- Comment By: Reuben Thomas (rrt) Date: 2007-05-05 09:34 Message: Logged In: YES user_id=50145 Originator: NO Oops, closed wrong bug. ---------------------------------------------------------------------- Comment By: Reuben Thomas (rrt) Date: 2007-05-05 09:34 Message: Logged In: YES user_id=50145 Originator: NO Fixed in CVS. ---------------------------------------------------------------------- Comment By: Reuben Thomas (rrt) Date: 2007-04-10 08:00 Message: Logged In: YES user_id=50145 Originator: NO Can someone confirm or deny this bug on a current CVS build? I'm hoping whatever underlying mess caused it is now fixed on Windows... ---------------------------------------------------------------------- Comment By: Reuben Thomas (rrt) Date: 2007-01-25 13:52 Message: Logged In: YES user_id=50145 Originator: NO I can't think of a way to get information into an arbitrary callback that is re-entrant. However, in this case we only want to get one bit of information in, so we can cheat and use two callbacks. Does that sound plausible? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110706&aid=1622653&group_id=10706 |