diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-20 17:12:33 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-20 17:12:33 +0000 |
commit | ee105bbcb3579e632b822f022d7aa3e606864d56 (patch) | |
tree | 6d3b88dc5825880414c9d8f8dd66a316a9752d74 /libmpdemux | |
parent | 19887dbfca0b5d460c795c86ffd4dfb2de1f0ddf (diff) | |
download | mpv-ee105bbcb3579e632b822f022d7aa3e606864d56.tar.bz2 mpv-ee105bbcb3579e632b822f022d7aa3e606864d56.tar.xz |
Ultravox improvements according to specs (didn't know they existed *g*)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16032 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/http.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libmpdemux/http.c b/libmpdemux/http.c index 4a3439d1d1..a3737e5f79 100644 --- a/libmpdemux/http.c +++ b/libmpdemux/http.c @@ -74,17 +74,20 @@ static unsigned uvox_meta_read(int fd, streaming_ctrl_t *sc) { 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; } |