[MPlayer-dev-eng] [PATCH] Play AMR over rtsp

Nico Sabbi nicola_sabbi at fastwebnet.it
Fri Mar 2 00:26:14 CET 2007


Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch allows to play AMR over rtsp.
> Sample stream:
> rtsp://81.196.182.171/demo/demo3gp20h.3gp
> 
> After I wrote this patch (inspired by vlc), I found this mail:
> http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-September/045754.html
> 
> The patch was not reviewed=-(, but should work as well.
> 
> Please review, Carl Eugen
> 
> 
> 
> 
> Index: libmpdemux/demux_rtp.cpp
> ===================================================================
> --- libmpdemux/demux_rtp.cpp	(Revision 22373)
> +++ libmpdemux/demux_rtp.cpp	(Arbeitskopie)
> @@ -390,6 +390,7 @@
>  			 unsigned /*numTruncatedBytes*/,
>  			 struct timeval presentationTime,
>  			 unsigned /*durationInMicroseconds*/) {
> +  int headersize = 0;
>    if (frameSize >= MAX_RTP_FRAME_SIZE) {
>      fprintf(stderr, "Saw an input frame too large (>=%d).  Increase MAX_RTP_FRAME_SIZE in \"demux_rtp.cpp\".\n",
>  	    MAX_RTP_FRAME_SIZE);
> @@ -400,8 +401,11 @@
>  
>    if (frameSize > 0) demuxer->stream->eof = 0;
>  
> +  if (bufferQueue->readSource()->isAMRAudioSource())
> +    headersize = 1;
> +
>    demux_packet_t* dp = bufferQueue->dp;
> -  resize_demux_packet(dp, frameSize);
> +  resize_demux_packet(dp, frameSize + headersize);
>  

is it a joke? 1 byte of extradata?
who's the idiot that designed this crap?
and why is it prepended to the demux_packet data rather than being 
copied to sh_audio->codecdata?

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



More information about the MPlayer-dev-eng mailing list