summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-26 17:54:52 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-26 17:55:05 +0300
commite913d6c5dabcf342d8c1a7070382d712fc354948 (patch)
tree965b5b698c7075e53123593eb4b5bfdb45d78c56 /stream
parentbe935e27666d8fdbf387adb1fcc30d243f6359dc (diff)
parent00959d5cf76d4ad94de9d0022b7b40a58acf2b95 (diff)
downloadmpv-e913d6c5dabcf342d8c1a7070382d712fc354948.tar.bz2
mpv-e913d6c5dabcf342d8c1a7070382d712fc354948.tar.xz
Merge svn changes up to r31004
Diffstat (limited to 'stream')
-rw-r--r--stream/http.c7
-rw-r--r--stream/stream.c2
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;