summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsf <rsf@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-02-22 06:20:08 +0000
committerrsf <rsf@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-02-22 06:20:08 +0000
commit4594011e67bade0720b24e8ede1e382f323c8a50 (patch)
tree6fac44f0b7ee0eb3e796f372dcf5237efcef93ce
parentc50ac5fc608698c340a99241f7761bed06e524e4 (diff)
downloadmpv-4594011e67bade0720b24e8ede1e382f323c8a50.tar.bz2
mpv-4594011e67bade0720b24e8ede1e382f323c8a50.tar.xz
Added support for multiplexed audio+video RTP streams.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11985 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/demux_rtp.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp
index d7b74ff0e8..5366cb8097 100644
--- a/libmpdemux/demux_rtp.cpp
+++ b/libmpdemux/demux_rtp.cpp
@@ -119,7 +119,7 @@ static char* openURL_sip(SIPClient* client, char const* url) {
int rtspStreamOverTCP = 0;
-extern "C" void demux_open_rtp(demuxer_t* demuxer) {
+extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) {
do {
TaskScheduler* scheduler = BasicTaskScheduler::createNew();
if (scheduler == NULL) break;
@@ -254,6 +254,17 @@ extern "C" void demux_open_rtp(demuxer_t* demuxer) {
rtpState->flags |= flags;
}
} while (0);
+
+ // Hack: If audio and video are demuxed together on a single RTP stream,
+ // then create a new "demuxer_t" structure to allow the higher-level
+ // code to recognize this:
+ if (demux_is_multiplexed_rtp_stream(demuxer)) {
+ stream_t* s = new_ds_stream(demuxer->video);
+ demuxer_t* od = demux_open(s, DEMUXER_TYPE_UNKNOWN, -1, -1, -1, NULL);
+ demuxer = new_demuxers_demuxer(od, od, od);
+ }
+
+ return demuxer;
}
extern "C" int demux_is_mpeg_rtp_stream(demuxer_t* demuxer) {