mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
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
This commit is contained in:
parent
19887dbfca
commit
ee105bbcb3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user