mirror of
https://github.com/mpv-player/mpv
synced 2024-12-15 19:35:49 +00:00
Fix playback of streams with more than one video track (only one supported).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25265 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
330359f85b
commit
8d5573a14e
@ -164,7 +164,7 @@ extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) {
|
||||
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(demuxer_t* demuxer) {
|
||||
}
|
||||
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(demuxer_t* demuxer) {
|
||||
rtspStreamOverTCP)) break;
|
||||
if (!strcmp(subsession->mediumName(), "audio"))
|
||||
audiofound = 1;
|
||||
if (!strcmp(subsession->mediumName(), "video"))
|
||||
videofound = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user