[vlc] Re: Audio eats memory when PTS is not stable
cedric marodon
cedric_marodon at yahoo.fr
Fri Jan 7 13:02:10 CET 2005
Maybe you can try to fix the memory leak with this part of code in waveout.c Open function() :
/* Calculate the frame size in bytes */
p_aout->output.i_nb_samples = FRAME_SIZE;
#ifdef WINCE
/* Check the buffer size -- minimum of 1/4 second (word aligned) */
if ( p_aout->output.i_nb_samples < (p_aout-output.output.i_rate/4) )
p_aout->output.i_nb_samples = ((p_aout->output.output.i_rate/4)+10)&~3;
//p_aout->output.i_nb_samples = ((p_aout->output.output.i_rate/4)+3)&~3;
#endif
aout_FormatPrepare( &p_aout->output.output );
#ifdef WINCE
p_aout->output.output.i_frame_length = p_aout->output.i_nb_samples;
p_aout->output.p_sys->i_buffer_size = p_aout->output.i_nb_samples *
p_aout->output.output.i_bytes_per_frame;
#else
p_aout->output.p_sys->i_buffer_size = FRAME_SIZE *
p_aout->output.output.i_bytes_per_frame;
#endif
In the Windows CE API, the waveout buffer length must contain at least a number of samples equal to a quarter second. If VLC asks for a smaller buffer, the minimal length is allocated and each buffer will not be free correctly.
Another memory leak found : do not forget to see if p_in is freed in ugly or linear audio resampler !
Hope this help ^_^
MixerAnderson
> As stated in a previous post. I have fixed the BIG leak, now there is just
> a
> small leak. I modified filters.c FiltersHintBuffers and changed
>
> p_first_alloc->i_alloc_type = AOUT_ALLOC_STACK;
> to
> p_first_alloc->i_alloc_type = AOUT_ALLOC_HEAP;
>
> That fixed the BIG leak.
>
> Now I get a small leak that seems to vary but is always in 4096bytes
> chunks. I am pretty sure it has to do with audio because I am listening to
> a
> Radio channel that has no Video and memory slower decreases.
>
> --
> Rick
> --
> This is the vlc mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://www.videolan.org/support/lists.html
>
>
> -----Original Message-----
> From: vlc-bounce at videolan.org [mailto:vlc-bounce at videolan.org] On Behalf
> Of
> John Anderson
> Sent: Thursday, January 06, 2005 12:10 PM
> To: vlc at videolan.org
> Subject: [vlc] Re: Audio eats memory when PTS is not stable
>
>
> ----- Original Message -----
> From: "Gildas Bazin" <gbazin at altern.org>
> To: <vlc at videolan.org>
> Sent: Thursday, January 06, 2005 1:06 PM
> Subject: [vlc] Re: Audio eats memory when PTS is not stable
>
>
>> On Wednesday 05 January 2005 15:52, Rick Davis wrote:
>> > All,
>> > When there are audio problems on a feed, the audio logic eats memory
>> > real fast. I am trying to run version 0.8.0 on Windows CE 5.0. I am
>> watching
>> > a live feed and there appears to be PTS problems. The audio logic eats
>> about
>> > 600KB of memory every second. Needless to say, on Windows CE it
>> doesn't
>> run
>> > for long.
>> >
>>
>> Could you try to make sure the problem comes from the audio output ?
>> Try to run VLC with --noaudio to check that the leak disappear.
>>
>> As for the PTS messages, you might be able to improve that by increasing
> the
>> caching with --udp-caching 600.
>
> He's probably on to something. I had the same memory leak when playing a
> networked streamed MPEG-2 PS video on my RH9 Linux box that had no sound
> card. If I turned off audio on the streaming source the memory leak
> disappeared.
>
> --
> This is the vlc mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://www.videolan.org/support/lists.html
>
>
>
> --
> This is the vlc mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://www.videolan.org/support/lists.html
>
>
---------------------------------
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20050107/7e1205bd/attachment.html>
More information about the vlc
mailing list