Browse Source

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
tags/n0.8
Martin Storsjö 15 years ago
parent
commit
9e99f84f7d
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/rtsp.c

+ 4
- 1
libavformat/rtsp.c View File

@@ -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;


Loading…
Cancel
Save