[FFmpeg-cvslog] r26022 - in trunk/libavformat: rtpdec.c rtsp.c

mstorsjo subversion
Wed Dec 15 22:06:26 CET 2010


Author: mstorsjo
Date: Wed Dec 15 22:06:25 2010
New Revision: 26022

Log:
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.

Modified:
   trunk/libavformat/rtpdec.c
   trunk/libavformat/rtsp.c

Modified: trunk/libavformat/rtpdec.c
==============================================================================
--- trunk/libavformat/rtpdec.c	Wed Dec 15 18:28:52 2010	(r26021)
+++ trunk/libavformat/rtpdec.c	Wed Dec 15 22:06:25 2010	(r26022)
@@ -393,7 +393,6 @@ RTPDemuxContext *rtp_parse_open(AVFormat
             return NULL;
         }
     } else {
-        av_set_pts_info(st, 32, 1, 90000);
         switch(st->codec->codec_id) {
         case CODEC_ID_MPEG1VIDEO:
         case CODEC_ID_MPEG2VIDEO:

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Wed Dec 15 18:28:52 2010	(r26021)
+++ trunk/libavformat/rtsp.c	Wed Dec 15 22:06:25 2010	(r26022)
@@ -333,7 +333,8 @@ static void sdp_parse_line(AVFormatConte
                 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(



More information about the ffmpeg-cvslog mailing list