[MPlayer-dev-eng] [PATCH] Save memory in demux_rtp.cpp

Nico Sabbi nicola_sabbi at fastwebnet.it
Mon Feb 26 00:29:38 CET 2007


Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached small patch leads to less memory consumption when buffers are
> reused in libmpdemux/demux_rtp.cpp
> 
> Please apply, Carl Eugen
> 
> 
> ------------------------------------------------------------------------
> 
> Index: libmpdemux/demux_rtp.cpp
> ===================================================================
> --- libmpdemux/demux_rtp.cpp	(Revision 22339)
> +++ libmpdemux/demux_rtp.cpp	(Arbeitskopie)
> @@ -560,6 +560,7 @@
>  }
>  
>  void ReadBufferQueue::savePendingBuffer(demux_packet_t* dp) {
> +  resize_demux_packet(dp, dp->len);
>    // Keep this buffer around, until MPlayer asks for it later:
>    if (pendingDPTail == NULL) {
>      pendingDPHead = pendingDPTail = dp;
> 
> 

dp->len is already the actual size of the packet, unless you call it 
with 0. Is it the case?

-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users



More information about the MPlayer-dev-eng mailing list