diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 17:54:52 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 17:55:05 +0300 |
commit | e913d6c5dabcf342d8c1a7070382d712fc354948 (patch) | |
tree | 965b5b698c7075e53123593eb4b5bfdb45d78c56 /stream/http.c | |
parent | be935e27666d8fdbf387adb1fcc30d243f6359dc (diff) | |
parent | 00959d5cf76d4ad94de9d0022b7b40a58acf2b95 (diff) | |
download | mpv-e913d6c5dabcf342d8c1a7070382d712fc354948.tar.bz2 mpv-e913d6c5dabcf342d8c1a7070382d712fc354948.tar.xz |
Merge svn changes up to r31004
Diffstat (limited to 'stream/http.c')
-rw-r--r-- | stream/http.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/stream/http.c b/stream/http.c index c1018ff4d3..dda668e5f4 100644 --- a/stream/http.c +++ b/stream/http.c @@ -123,8 +123,13 @@ static void scast_meta_read(int fd, streaming_ctrl_t *sc) { my_read(fd, &tmp, 1, sc); metalen = tmp * 16; if (metalen > 0) { - char *info = malloc(metalen + 1); + int i; + uint8_t *info = malloc(metalen + 1); unsigned nlen = my_read(fd, info, metalen, sc); + // avoid breaking the user's terminal too much + if (nlen > 256) nlen = 256; + for (i = 0; i < nlen; i++) + if (info[i] && info[i] < 32) info[i] = '?'; info[nlen] = 0; mp_msg(MSGT_DEMUXER, MSGL_INFO, "\nICY Info: %s\n", info); free(info); |