diff options
author | Martin Storsjö <martin@martin.st> | 2010-12-27 09:56:19 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-12-27 09:56:19 +0000 |
commit | 9e99f84f7d4fabbbf224da152eacd8f4a50b7bd3 (patch) | |
tree | 66190533f6dd577ae2dea0db89cafa8a3e838402 | |
parent | 106f271fdcdccfedff4554a5377a13e443d9ede3 (diff) | |
download | ffmpeg-9e99f84f7d4fabbbf224da152eacd8f4a50b7bd3.tar.gz |
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.
Originally committed as revision 26107 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/rtsp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 48ed6b5d46..8c9d79cd8f 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1557,7 +1557,10 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt) 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; |