diff options
author | Martin Storsjö <martin@martin.st> | 2010-12-15 21:06:25 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-12-15 21:06:25 +0000 |
commit | bbd8f5477d29ae0d22ad0a8711d95299e009ec36 (patch) | |
tree | 8f4e41523d9d8b1f80f113e8f2943539c8e85e4d | |
parent | 1c3e117e0bd73ffc5a3abeb35b521fd048988f06 (diff) | |
download | ffmpeg-streaming-bbd8f5477d29ae0d22ad0a8711d95299e009ec36.zip ffmpeg-streaming-bbd8f5477d29ae0d22ad0a8711d95299e009ec36.tar.gz |
rtsp: Don't set the RTP time base from the sample rate if no sample rate is set
This also reverts SVN rev 26016, which incorrectly overwrote the time base
with 90 kHz for all streams, regardless of what was set by the SDP parsing.
The stream that triggered the fix in 26016 still works after this commit.
Originally committed as revision 26022 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/rtpdec.c | 1 | ||||
-rw-r--r-- | libavformat/rtsp.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 43002ca..77b59a3 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -393,7 +393,6 @@ RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *r return NULL; } } else { - av_set_pts_info(st, 32, 1, 90000); switch(st->codec->codec_id) { case CODEC_ID_MPEG1VIDEO: case CODEC_ID_MPEG2VIDEO: diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 1dd166e..2703400 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -333,7 +333,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, RTPDynamicProtocolHandler *handler; /* if standard payload type, we can find the codec right now */ ff_rtp_get_codec_info(st->codec, rtsp_st->sdp_payload_type); - if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) + if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && + st->codec->sample_rate > 0) av_set_pts_info(st, 32, 1, st->codec->sample_rate); /* Even static payload types may need a custom depacketizer */ handler = ff_rtp_handler_find_by_id( |