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

mstorsjo subversion
Mon Dec 27 10:56:19 CET 2010


Author: mstorsjo
Date: Mon Dec 27 10:56:19 2010
New Revision: 26107

Log:
rtsp: Check if the rtp stream actually has an RTPDemuxContext

For example MS-RTSP doesn't have RTPDemuxContexts for all streams.

This fixes issue 2448.

Modified:
   trunk/libavformat/rtsp.c

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Mon Dec 27 10:30:20 2010	(r26106)
+++ trunk/libavformat/rtsp.c	Mon Dec 27 10:56:19 2010	(r26107)
@@ -1557,7 +1557,10 @@ int ff_rtsp_fetch_packet(AVFormatContext
         int64_t first_queue_time = 0;
         for (i = 0; i < rt->nb_rtsp_streams; i++) {
             RTPDemuxContext *rtpctx = rt->rtsp_streams[i]->transport_priv;
-            int64_t queue_time = ff_rtp_queued_packet_time(rtpctx);
+            int64_t queue_time;
+            if (!rtpctx)
+                continue;
+            queue_time = ff_rtp_queued_packet_time(rtpctx);
             if (queue_time && (queue_time - first_queue_time < 0 ||
                                !first_queue_time)) {
                 first_queue_time = queue_time;



More information about the ffmpeg-cvslog mailing list