summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/demux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index c6dcbf280..ed802d8fa 100644
--- a/src/xine-engine/demux.c
+++ b/src/xine-engine/demux.c
@@ -350,8 +350,8 @@ int xine_demux_read_header( input_plugin_t *input, unsigned char *buffer, off_t
return 0;
input->seek(input, 0, SEEK_SET);
} else if (input->get_capabilities(input) & INPUT_CAP_PREVIEW) {
- buf = xine_xmalloc(MAX_PREVIEW_SIZE);
- read_size = input->get_optional_data(input, buf, INPUT_OPTIONAL_DATA_PREVIEW);
+ buf = xine_xmalloc(size);
+ read_size = input->get_optional_data(input, buf, size);
memcpy(buffer, buf, size);
free(buf);
} else {