summaryrefslogtreecommitdiffstats
path: root/stream/stream_bluray.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_bluray.c')
-rw-r--r--stream/stream_bluray.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c
index 5f380458c7..8ee69aaa80 100644
--- a/stream/stream_bluray.c
+++ b/stream/stream_bluray.c
@@ -30,6 +30,8 @@
*/
#include <libbluray/bluray.h>
+#include <string.h>
+#include <assert.h>
#include "config.h"
#include "libavutil/common.h"
@@ -215,7 +217,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
}
while (count-- > 0) {
if (si->pid == req->id) {
- req->name = talloc_strndup(NULL, si->lang, 4);
+ snprintf(req->name, sizeof(req->name), "%.4s", si->lang);
bd_free_title_info(ti);
return STREAM_OK;
}