[MPlayer-dev-eng] Re: [PATCH]H264 over rtsp

Carl Eugen Hoyos cehoyos at ag.or.at
Mon May 8 00:23:54 CEST 2006


Hi Ross!

Ross Finlayson <finlayson <at> live555.com> writes:

> Most of this looks OK, *except* for that hideous code that you've 
> added to the "getBuffer()" routine in "demux_rtp.cpp".  I'm not sure 
> what that code is supposed to be doing, but it looks like it's trying 
> to do some filtering on the incoming data that should really be done 
> (if at all) by the H.264 decoding library instead.  In any case, the 
> VLC code doesn't do anything like this, and neither should MPlayer.

Thanks for the quick response. After looking in the dictionary, I agree, my
patch is "hideous" - OTOH, it works. Did you try it?

While I think of something less ugly, could you look at this small patch? I
think frame rate guessing doesn't work without it.

Thank you, Carl Eugen Hoyos

Index: libmpdemux/demux_rtp_codec.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_rtp_codec.cpp,v
retrieving revision 1.8
diff -u -r1.8 demux_rtp_codec.cpp
--- libmpdemux/demux_rtp_codec.cpp      23 Sep 2005 22:35:03 -0000      1.8
+++ libmpdemux/demux_rtp_codec.cpp      7 May 2006 22:22:19 -0000
@@ -233,6 +233,7 @@
       fps = (int)(1/(curPTS-lastPTS) + 0.5); // rounding
       fprintf(stderr, "demux_rtp: Guessed the video frame rate as %d
frames-per-second.\n\t(If this is wrong, use the \"-fps <frame-rate>\" option
instead.)\n", fps);
       sh_video->fps = fps;
+      sh_video->frametime=1.0f/fps;
       return;
     }
     lastPTS = curPTS;





More information about the MPlayer-dev-eng mailing list