Commit 9e99f84f authored by Martin Storsjö's avatar Martin Storsjö

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
parent 106f271f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment