From 4fb74b4289489e79b47b94227fdd1cc6104f01f2 Mon Sep 17 00:00:00 2001 From: Mke Brady Date: Wed, 3 Jun 2015 21:13:40 +0100 Subject: [PATCH] Add enclosing XML item tags to each item of metadata --- rtsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtsp.c b/rtsp.c index f25ba57b..f13da7c1 100644 --- a/rtsp.c +++ b/rtsp.c @@ -942,7 +942,7 @@ void metadata_process(uint32_t type, uint32_t code, char *data, uint32_t length) if (fd < 0) return; char thestring[1024]; - snprintf(thestring, 1024, "%x%x%u\n", type, code, + snprintf(thestring, 1024, "\n%x%x%u\n", type, code, length); ret = non_blocking_write(fd, thestring, strlen(thestring)); if (ret < 1) @@ -973,7 +973,7 @@ void metadata_process(uint32_t type, uint32_t code, char *data, uint32_t length) remaining_data += towrite_count; remaining_count -= towrite_count; } - snprintf(thestring, 1024, "\n"); + snprintf(thestring, 1024, "\n\n"); ret = non_blocking_write(fd, thestring, strlen(thestring)); if (ret < 1) // no reader return;