[vorbis-dev] Problems trying to run the examples in windows v orbis sdk

Pablos-Sanchez, Rolando Rolando_Pablos-Sanchez at hplb.hpl.hp.com
Wed Sep 5 02:56:47 PDT 2001



Yes, it works now. 
Thank you very much.

-----Original Message-----
From: Chris Wolf [mailto:cwolf at starclass.com]
Sent: 05 September 2001 10:12
To: vorbis-dev at xiph.org
Subject: Re: [vorbis-dev] Problems trying to run the examples in windows
vorbis sdk

On 9/4/2001 at 6:00 PM Pablos-Sanchez, Rolando wrote:

>I have just downloaded the vorbis sdk for windows, for researching
>purposes.
>
>I have compiled the example 'encoder_example.c' just to start, and it
>compiles, but I got a error in the following line just at the beginning: 
>vorbis_encode_init(&vi,2,44100, -1, 128000, -1);
>The error is more or less: The instruction at '0xaddresss' referenced
>memory
>at '0xaddress'. The memory could not be "read".
>Something about bad pointed pointers, I think.
>So I haven't been able to start testing yet. I have tried with static link
>library and dynamic but nothing to do. 
>
>Then I have downloaded the source and I got the same problem, but now I
>know
>in which exact line the error is.
>Inside the vorbisenc.c, we have the following function:
>static void codec_setup_partialcopy(codec_setup_info *ci,
>codec_setup_info *cs){
>int i;
>memcpy(ci,cs,sizeof(codec_setup_info)); /* to get the flat numbers */
>/* codebooks */
>for(i=0;i<ci->books;i++){
>ci->book_param[i]=cs->book_param[i];
>}
>/* time backend settings */
>for(i=0;i<ci->times;i++){
>ci->time_param[i]=_time_P[ci->time_type[i]]-> // <---The error is in this
>line
>copy_info(cs->time_param[i]);
>}
>...

The work around for this problem is to include vorbisenc.c in the vorbis DLL
and not have a
separate, stand alone vorbisenc.dll.  If you do this, then this problem
disappears.  Obviously,
since the vorbisenc code is quite large, and a lot of applications will only
be decoding, this
is not a permenent solution.

This may have to do with how global data is treated in DLLs, which is that
each client gets a 
fresh instance of the global data.  The problem seems to be accessing
_time_P accross DLLs
(vorbisenc.dll accessing _time_P in vorbis.dll)  I'm thinking of trying a
named data segment.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to
'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list