mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
This commit is contained in:
parent
106f271fdc
commit
9e99f84f7d
@ -1557,7 +1557,10 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
int64_t first_queue_time = 0;
|
int64_t first_queue_time = 0;
|
||||||
for (i = 0; i < rt->nb_rtsp_streams; i++) {
|
for (i = 0; i < rt->nb_rtsp_streams; i++) {
|
||||||
RTPDemuxContext *rtpctx = rt->rtsp_streams[i]->transport_priv;
|
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 ||
|
if (queue_time && (queue_time - first_queue_time < 0 ||
|
||||||
!first_queue_time)) {
|
!first_queue_time)) {
|
||||||
first_queue_time = queue_time;
|
first_queue_time = queue_time;
|
||||||
|
Loading…
Reference in New Issue
Block a user