changeset 7730:8ead080de60c

-fps autodetection patch by Ross Finlayson <finlayson@live.com>
author arpi
date Sun, 13 Oct 2002 21:57:54 +0000
parents 36170c5a3c9a
children 1f8961f2b34c
files libmpdemux/demux_rtp.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rtp.cpp	Sun Oct 13 21:40:10 2002 +0000
+++ b/libmpdemux/demux_rtp.cpp	Sun Oct 13 21:57:54 2002 +0000
@@ -179,6 +179,11 @@
 	  demux_stream_t* d_video = demuxer->video;
 	  d_video->sh = sh_video; sh_video->ds = d_video;
 
+	  // If we happen to know the subsession's video frame rate, set it,
+	  // so that the user doesn't have to give the "-fps" option instead.
+	  int fps = (int)(subsession->videoFPS());
+	  if (fps != 0) sh_video->fps = fps;
+
 	  // Map known video MIME types to the BITMAPINFOHEADER parameters
 	  // that this program uses.  (Note that not all types need all
 	  // of the parameters to be set.)