diff options
author | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-19 13:27:27 +0000 |
---|---|---|
committer | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-19 13:27:27 +0000 |
commit | 52dd75e903d5c5d0424128fc813a00cc1d1fc36d (patch) | |
tree | fcf34096e7d6b17a9383ad8200f6747e0dd6f925 /libmpdemux | |
parent | 2919230676e19f73d6cfa12cbbef429d395ae8e7 (diff) |
Allows the LIVE555 library to forces the client's port to be used
when reading from an RTP/RTSP source.
Patch from Benjamin Zores <ben@geexbox.org> and Patrick Labatut <plabatut@gmail.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17651 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_rtp.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp index 5dfe7585c7..45291d6980 100644 --- a/libmpdemux/demux_rtp.cpp +++ b/libmpdemux/demux_rtp.cpp @@ -90,6 +90,7 @@ static char* openURL_sip(SIPClient* client, char const* url) { } int rtspStreamOverTCP = 0; +int rtsp_port = 0; extern "C" int audio_id, video_id, dvdsub_id; extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { @@ -174,10 +175,13 @@ extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { continue; } + if (rtsp_port) + subsession->setClientPortNum (rtsp_port); + if (!subsession->initiate()) { fprintf(stderr, "Failed to initiate \"%s/%s\" RTP subsession: %s\n", subsession->mediumName(), subsession->codecName(), env->getResultMsg()); } else { - fprintf(stderr, "Initiated \"%s/%s\" RTP subsession\n", subsession->mediumName(), subsession->codecName()); + fprintf(stderr, "Initiated \"%s/%s\" RTP subsession on port %d\n", subsession->mediumName(), subsession->codecName(), subsession->clientPortNum()); // Set the OS's socket receive buffer sufficiently large to avoid // incoming packets getting dropped between successive reads from this |