[MPlayer-cvslog] CVS: main/libmpdemux http.c,1.24,1.25

Reimar Döffinger CVS syncmail at mplayerhq.hu
Wed Jul 20 19:12:36 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv13664

Modified Files:
	http.c 
Log Message:
Ultravox improvements according to specs (didn't know they existed *g*)


Index: http.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/http.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- http.c	19 Jul 2005 12:07:04 -0000	1.24
+++ http.c	20 Jul 2005 17:12:33 -0000	1.25
@@ -74,17 +74,20 @@
       my_read(fd, info, 6, sc);
     else
       my_read(fd, &info[1], 5, sc);
-    if (info[0] != 0x5a || info[1] != 0x00) {
+    // sync byte and reserved flags
+    if (info[0] != 0x5a || (info[1] & 0xfc) != 0x00) {
       mp_msg(MSGT_DEMUXER, MSGL_ERR, "Invalid or unknown uvox metadata\n");
       return 0;
     }
+    if (info[1] & 0x01)
+      mp_msg(MSGT_DEMUXER, MSGL_WARN, "Encrypted ultravox data\n");
     metaint = info[4] << 8 | info[5];
-    if (info[3] == 0x02) {
+    if ((info[3] & 0xf) < 0x07) { // discard any metadata nonsense
       char *metabuf = malloc(metaint);
       my_read(fd, metabuf, metaint, sc);
       free(metabuf);
     }
-  } while (info[3] == 0x02);
+  } while ((info[3] & 0xf) < 0x07);
   return metaint;
 }
 




More information about the MPlayer-cvslog mailing list