mirror of https://github.com/mpv-player/mpv
Fix for realrtsp urls with more than 2 streams:
- do setup for all the streams we subscribed to - Use all bits of stream id, not only the lsbit Fixes rtsp://vodreal.stanford.edu/opa/philo/061022.rm git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22767 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
42314cb0ba
commit
f8dcd9f789
|
@ -392,7 +392,7 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) {
|
||||||
|
|
||||||
ph.object_version=0;
|
ph.object_version=0;
|
||||||
ph.length=size;
|
ph.length=size;
|
||||||
ph.stream_number=(flags1>>1)&1;
|
ph.stream_number=(flags1>>1)&0x1f;
|
||||||
ph.timestamp=ts;
|
ph.timestamp=ts;
|
||||||
ph.reserved=0;
|
ph.reserved=0;
|
||||||
if ((flags2&1) == 0 && (prev_ts != ts || prev_stream_number != ph.stream_number))
|
if ((flags2&1) == 0 && (prev_ts != ts || prev_stream_number != ph.stream_number))
|
||||||
|
@ -452,6 +452,7 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidt
|
||||||
int status;
|
int status;
|
||||||
uint32_t maxbandwidth = bandwidth;
|
uint32_t maxbandwidth = bandwidth;
|
||||||
char* authfield = NULL;
|
char* authfield = NULL;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* get challenge */
|
/* get challenge */
|
||||||
challenge1=strdup(rtsp_search_answers(rtsp_session,"RealChallenge1"));
|
challenge1=strdup(rtsp_search_answers(rtsp_session,"RealChallenge1"));
|
||||||
|
@ -591,14 +592,15 @@ autherr:
|
||||||
sprintf(buf, "%s/streamid=0", mrl);
|
sprintf(buf, "%s/streamid=0", mrl);
|
||||||
rtsp_request_setup(rtsp_session,buf,NULL);
|
rtsp_request_setup(rtsp_session,buf,NULL);
|
||||||
|
|
||||||
if (h->prop->num_streams > 1) {
|
/* Do setup for all the other streams we subscribed to */
|
||||||
|
for (i = 1; i < h->prop->num_streams; i++) {
|
||||||
rtsp_schedule_field(rtsp_session, "Transport: x-pn-tng/tcp;mode=play,rtp/avp/tcp;unicast;mode=play");
|
rtsp_schedule_field(rtsp_session, "Transport: x-pn-tng/tcp;mode=play,rtp/avp/tcp;unicast;mode=play");
|
||||||
buf = xbuffer_ensure_size(buf, strlen(session_id) + 32);
|
buf = xbuffer_ensure_size(buf, strlen(session_id) + 32);
|
||||||
sprintf(buf, "If-Match: %s", session_id);
|
sprintf(buf, "If-Match: %s", session_id);
|
||||||
rtsp_schedule_field(rtsp_session, buf);
|
rtsp_schedule_field(rtsp_session, buf);
|
||||||
|
|
||||||
buf = xbuffer_ensure_size(buf, strlen(mrl) + 32);
|
buf = xbuffer_ensure_size(buf, strlen(mrl) + 32);
|
||||||
sprintf(buf, "%s/streamid=1", mrl);
|
sprintf(buf, "%s/streamid=%d", mrl, i);
|
||||||
rtsp_request_setup(rtsp_session,buf,NULL);
|
rtsp_request_setup(rtsp_session,buf,NULL);
|
||||||
}
|
}
|
||||||
/* set stream parameter (bandwidth) with our subscribe string */
|
/* set stream parameter (bandwidth) with our subscribe string */
|
||||||
|
|
Loading…
Reference in New Issue