summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2004-12-14 08:18:36 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2004-12-14 08:18:36 +0000
commit14c989ab7bc8d7753eb2f54b6193b8e27a9efb6f (patch)
tree92482d0adc3172551de0c65ace95e7443eb9d11b
parent9228c8d79359fcd564dff11777e5c962f172d5f4 (diff)
downloadxine-lib-14c989ab7bc8d7753eb2f54b6193b8e27a9efb6f.tar.gz
xine-lib-14c989ab7bc8d7753eb2f54b6193b8e27a9efb6f.tar.bz2
Do not reset the first bytes of the stream.
Fix this issue: https://sourceforge.net/tracker/index.php?func=detail&aid=1077868&group_id=9655&atid=109655 CVS patchset: 7252 CVS date: 2004/12/14 08:18:36
-rw-r--r--src/input/mms.c18
-rw-r--r--src/input/mmsh.c14
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;