search for: _ogg_malloc

Displaying 13 results from an estimated 13 matches for "_ogg_malloc".

Did you mean: _ogg_calloc
2000 Nov 08
0
vq diffs
...; -#include "../lib/sharedbook.h" +#include "misc.h" /* ogg_malloc, etc. */ #include "bookutil.h" +#include "codebook.h" /* A few little utils for reading files */ @@ -41,8 +41,8 @@ if(!lbufsize){ lbufsize=1024; - linebuffer=_ogg_malloc(lbufsize); + linebuffer=(char*)_ogg_malloc(lbufsize); }else{ lbufsize*=2; - linebuffer=_ogg_realloc(linebuffer,lbufsize); + linebuffer=(char*)_ogg_realloc(linebuffer,lbufsize); } } @@ -179,6 +179,7 @@ codebook *codebook_load(char *filename){ - co...
2001 Feb 01
1
minor psy.c modifications
...on: _vp_psy_init 1. '-' or '+' in this line? maxoc=toOC((n*.5f - .25f)*rate/n)*(1<<(p->shiftoc+1))+.5f; maxoc=toOC((n*.5f + .25f)*rate/n)*(1<<(p->shiftoc+1))+.5f; 2. I know: sizeof(float *) and sizeof(float) are 4 bytes long, but... old lines: p->noisemedian=_ogg_malloc(n*sizeof(float *)); p->noiseoffset=_ogg_malloc(n*sizeof(float *)); p->tonecurves[i]=_ogg_malloc(P_LEVELS*sizeof(float *)); new (corrected) lines: p->noisemedian=_ogg_malloc(n*sizeof(float)); p->noiseoffset=_ogg_malloc(n*sizeof(float)); p->tonecurves[i]=_ogg_malloc(P_LEVELS*sizeof(fl...
2005 Oct 26
1
Small memory leak...
...ack_bytes(opb)); memcpy(op->packet, oggpack_get_buffer(opb), oggpack_bytes(opb)); oggpack_writeclear(opb); #else In my small testing application my debugger says there are 50 bytes of memory lost and it refers to op->packet=malloc(oggpack_bytes(opb)); I tried also: op->packet=_ogg_malloc(oggpack_bytes(opb)); But I got always this leak. How should I free that space ? _ogg_free(op->packet); In the end of my application doesn't work... segmentation fault. I can't go on if I don't solve this so help me please... In alternative I could avoid this function if possible...
2005 Oct 26
1
Small memory leak...
...ack_bytes(opb)); memcpy(op->packet, oggpack_get_buffer(opb), oggpack_bytes(opb)); oggpack_writeclear(opb); #else In my small testing application my debugger says there are 50 bytes of memory lost and it refers to op->packet=malloc(oggpack_bytes(opb)); I tried also: op->packet=_ogg_malloc(oggpack_bytes(opb)); But I got always this leak. How should I free that space ? _ogg_free(op->packet); In the end of my application doesn't work... segmentation fault. I can't go on if I don't solve this so help me please... In alternative I could avoid this function if possible...
2004 Sep 07
3
Introducing ov_open_callbacksp and ov_clearp
...s, ov_callbacks callbacks); IMPORT_C int ov_info_basic(OggVorbis_File *vf,int link, int *channels, long *rate); And that to vorbisfile.c: EXPORT_C int ov_open_callbacksp(void *f,OggVorbis_File **vf,char *initial,long ibytes, ov_callbacks callbacks){ int ret; if (vf==NULL) return -1; *vf=_ogg_malloc(sizeof(OggVorbis_File)); if (*vf==NULL) return -1; ret=_ov_open1(f,*vf,initial,ibytes,callbacks); if(ret!=0 || (ret=_ov_open2(*vf)) != 0) { ov_clearp(*vf); *vf = NULL; return ret; } return 0; } EXPORT_C int ov_clearp(OggVorbis_File *vf){ ov_clear(vf); if (vf) _ogg_free(v...
2001 Jan 18
2
Ogg Vorbis on PPC Linux?
...d to fit: R_PPC_REL24 _ogg_calloc mapping0.o(.text+0x678): undefined reference to `_ogg_free' mapping0.o(.text+0x678): relocation truncated to fit: R_PPC_REL24 _ogg_free ../lib/.libs/libvorbis.a(mapping0.o): In function `mapping0_copy_info': mapping0.o(.text+0x1220): undefined reference to `_ogg_malloc' mapping0.o(.text+0x1220): relocation truncated to fit: R_PPC_REL24 _ogg_malloc ../lib/.libs/libvorbis.a(mapping0.o): In function `mapping0_free_info': mapping0.o(.text+0x1290): undefined reference to `_ogg_free' mapping0.o(.text+0x1290): relocation truncated to fit: R_PPC_REL24 _ogg_fr...
2015 Oct 12
2
Use of alloca in vorbis_comment_add_tag
Dear Vorbis devs, I'm Robert Kausch, author of fre:ac - free audio converter. Please consider using _ogg_malloc/_ogg_free in place of alloca in vorbis_comment_add_tag. alloca will cause undefined behaviour/crashing when it causes a stack overflow which can easily happen when adding cover art in a METADATA_BLOCK_PICTURE comment. I had a user trying to convert a FLAC file with a 2 MB embedded cover art th...
2011 Nov 07
1
Out of memory handling?
Hi, As far as I see in libvorbis most of the places where _ogg_malloc(), _ogg_realloc and _ogg_calloc() is called the return value is not checked for out of memory condition. Is there any plan to change this? For my use-case the application is not allowed to crash. So if libvorbis can not handle this condition, I guess I would need to preallocate a large enough cust...
2005 Oct 28
2
Invalid read of size 1...
Hi all. I'm here again :) The small leak in my app is gone. I'm going on with it, now I grab a frame from a video device and I encode it with Theora... The debugger ( valgrind ) says: ... ==2782== Invalid read of size 1 ==2782== at 0x1B94B0BD: PixelLineSearch (scan.c:1482) ==2782== by 0x1B94B35A: PixelLineSearch (scan.c:1597) ==2782== by 0x1B94B447: LineSearchScorePixel
2001 May 01
1
encoder observation
Hello! First of all a question: When you make the encoder tables (ie: mode_e.h) do you use the mapping0_forward function? Because you made the encoder tables, and after this you did a minor correction in the final beta4 ... (this correction was: additional[0]=fabs(additional[0]*scale); in the mapping0_forward function) (I see this was a bug, and the modification was correct, but this correction
2007 Mar 16
1
ogg_sync_buffer() memory alignment
I am writing an Ogg Vorbis decoder for win32. I want a memory buffer which is aligned to the disk sector size (512 bytes on hard disk, 2048 bytes on cd/dvd), so that the win32 function ReadFile can be persuaded to do 'unbuffered IO'. Unfortunately, the ogg_sync_buffer() call gives me a pointer from its own, internally allocated buffer. I have found no docs to indicate that this would
2006 Jan 13
2
libogg2 issue in revision 10730
...; you immediately get a segmentation fault which really is undesirable. However, I could be totally wrong as I might have overlooked something. My suggestion is this: Just do a malloc() on the condition that b is NULL: void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){ if (!b) b = _ogg_malloc(sizeof(oggpack_buffer)); memset(b,0,sizeof(*b)); b->tail=b->head=r; b->count=0; b->headptr=b->head->buffer->data+b->head->begin; b->headend=b->head->length; _span(b); } That way you have to initialize your b before calling the function though (like...
2012 Oct 10
5
Theora integration question
Hello, I am programmer working on a product which integrates Theora. I have a question regarding the memory use on some of the internals of Theora. Is this the right forum for this question, and if not, does anyone know where an appropriate place to ask is? Thanks Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: