[MPlayer-cvslog] r25265 - trunk/libmpdemux/demux_rtp.cpp
cehoyos
subversion at mplayerhq.hu
Sun Dec 2 19:04:14 CET 2007
Author: cehoyos
Date: Sun Dec 2 19:04:14 2007
New Revision: 25265
Log:
Fix playback of streams with more than one video track (only one supported).
Modified:
trunk/libmpdemux/demux_rtp.cpp
Modified: trunk/libmpdemux/demux_rtp.cpp
==============================================================================
--- trunk/libmpdemux/demux_rtp.cpp (original)
+++ trunk/libmpdemux/demux_rtp.cpp Sun Dec 2 19:04:14 2007
@@ -164,7 +164,7 @@ extern "C" demuxer_t* demux_open_rtp(dem
rtpState->firstSyncTime.tv_sec = rtpState->firstSyncTime.tv_usec = 0;
demuxer->priv = rtpState;
- int audiofound = 0;
+ int audiofound = 0, videofound = 0;
// Create RTP receivers (sources) for each subsession:
MediaSubsessionIterator iter(*mediaSession);
MediaSubsession* subsession;
@@ -178,6 +178,10 @@ extern "C" demuxer_t* demux_open_rtp(dem
}
desiredReceiveBufferSize = 100000;
} else if (strcmp(subsession->mediumName(), "video") == 0) {
+ if (videofound) {
+ fprintf(stderr, "Additional subsession \"video/%s\" skipped\n", subsession->codecName());
+ continue;
+ }
desiredReceiveBufferSize = 2000000;
} else {
continue;
@@ -210,6 +214,8 @@ extern "C" demuxer_t* demux_open_rtp(dem
rtspStreamOverTCP)) break;
if (!strcmp(subsession->mediumName(), "audio"))
audiofound = 1;
+ if (!strcmp(subsession->mediumName(), "video"))
+ videofound = 1;
}
}
}
More information about the MPlayer-cvslog
mailing list