[FFmpeg-cvslog] r25907 - trunk/libavformat/rtsp.c

mstorsjo subversion
Tue Dec 7 14:28:46 CET 2010


Author: mstorsjo
Date: Tue Dec  7 14:28:45 2010
New Revision: 25907

Log:
rtsp: Parse RealRTSP sample rate declarations from the SDP

The RTP time base can be different from the actual content sample rate.

Modified:
   trunk/libavformat/rtsp.c

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Tue Dec  7 14:28:13 2010	(r25906)
+++ trunk/libavformat/rtsp.c	Tue Dec  7 14:28:45 2010	(r25907)
@@ -399,6 +399,10 @@ static void sdp_parse_line(AVFormatConte
         } else if (av_strstart(p, "IsRealDataType:integer;",&p)) {
             if (atoi(p) == 1)
                 rt->transport = RTSP_TRANSPORT_RDT;
+        } else if (av_strstart(p, "SampleRate:integer;", &p) &&
+                   s->nb_streams > 0) {
+            st = s->streams[s->nb_streams - 1];
+            st->codec->sample_rate = atoi(p);
         } else {
             if (rt->server_type == RTSP_SERVER_WMS)
                 ff_wms_parse_sdp_a_line(s, p);



More information about the ffmpeg-cvslog mailing list