diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/input/mms.c | 18 | ||||
-rw-r--r-- | src/input/mmsh.c | 14 |
2 files changed, 17 insertions, 15 deletions
diff --git a/src/input/mms.c b/src/input/mms.c index c2cef14bf..e87fcb77c 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.50 2004/12/13 19:12:56 miguelfreitas Exp $ + * $Id: mms.c,v 1.51 2004/12/14 08:18:36 tmattern Exp $ * * MMS over TCP protocol * based on work from major mms @@ -516,18 +516,18 @@ static int get_asf_header (mms_t *this) { static void interp_asf_header (mms_t *this) { int i; - + this->asf_packet_len = 0; this->num_stream_ids = 0; /* * parse header */ - + i = 30; while (i < this->asf_header_len) { - int guid; uint64_t length; + int guid; guid = get_guid(this->asf_header, i); i += 16; @@ -784,10 +784,12 @@ int static mms_choose_best_streams(mms_t *this) { this->scmd_body [ (i - 1) * 6 + 7 ] = 0x00; /* forces the asf demuxer to not choose this stream */ - this->asf_header[this->bitrates_pos[this->stream_ids[i]]] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 1] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 2] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 3] = 0; + if (this->bitrates_pos[this->stream_ids[i]]) { + this->asf_header[this->bitrates_pos[this->stream_ids[i]]] = 0; + this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 1] = 0; + this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 2] = 0; + this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 3] = 0; + } } } diff --git a/src/input/mmsh.c b/src/input/mmsh.c index 9e7ee1cc4..54668ccc9 100644 --- a/src/input/mmsh.c +++ b/src/input/mmsh.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mmsh.c,v 1.31 2004/12/13 21:06:54 tmattern Exp $ + * $Id: mmsh.c,v 1.32 2004/12/14 08:18:36 tmattern Exp $ * * MMS over HTTP protocol * written by Thibaut Mattern @@ -349,7 +349,6 @@ static int get_chunk_header (mmsh_t *this) { } this->chunk_type = LE_16 (&chunk_header[0]); this->chunk_length = LE_16 (&chunk_header[2]); - lprintf ("get_chunk_header2\n"); switch (this->chunk_type) { case CHUNK_TYPE_DATA: @@ -376,7 +375,6 @@ static int get_chunk_header (mmsh_t *this) { return 0; } } - lprintf ("get_chunk_header3\n"); switch (this->chunk_type) { case CHUNK_TYPE_DATA: @@ -797,10 +795,12 @@ static int mmsh_connect_int(mmsh_t *this, int bandwidth) { lprintf("disabling stream %d\n", this->stream_ids[i]); /* forces the asf demuxer to not choose this stream */ - this->asf_header[this->bitrates_pos[this->stream_ids[i]]] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 1] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 2] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 3] = 0; + if (this->bitrates_pos[this->stream_ids[i]]) { + this->asf_header[this->bitrates_pos[this->stream_ids[i]]] = 0; + this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 1] = 0; + this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 2] = 0; + this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 3] = 0; + } } } return 1; |