diff options
Diffstat (limited to 'stream')
-rw-r--r-- | stream/http.c | 7 | ||||
-rw-r--r-- | stream/stream.c | 2 |
2 files changed, 6 insertions, 3 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); diff --git a/stream/stream.c b/stream/stream.c index 890a12f41c..80e37369f7 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -47,8 +47,6 @@ #include "cache2.h" -//#include "vcd_read_bincue.h" - struct input_ctx; static int (*stream_check_interrupt_cb)(struct input_ctx *ctx, int time); static struct input_ctx *stream_check_interrupt_ctx; |