diff options
author | Martin Storsjö <martin@martin.st> | 2010-12-07 13:28:45 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-12-07 13:28:45 +0000 |
commit | bb776f3b0037b4ddc2977643fb0efaeff756babc (patch) | |
tree | ae75adf62ef16347a698193cc552659f6d2fe0fc | |
parent | 2eeefe205ff45f1a09290221fe4e1062f84ac781 (diff) | |
download | ffmpeg-bb776f3b0037b4ddc2977643fb0efaeff756babc.tar.gz |
rtsp: Parse RealRTSP sample rate declarations from the SDP
The RTP time base can be different from the actual content sample rate.
Originally committed as revision 25907 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/rtsp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index ce26911489..e4269deab0 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -399,6 +399,10 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, } 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); |