Skip to content
Snippets Groups Projects
Commit 43977a3a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

ytdl: pass custom data to JSON parser

parent 249ee77f
No related branches found
No related tags found
Loading
......@@ -37,11 +37,15 @@
#include <vlc_plugin.h>
#include <vlc_spawn.h>
struct ytdl_json {
struct vlc_logger *logger;
};
void json_parse_error(void *data, const char *msg)
{
struct vlc_logger *log = data;
struct ytdl_json *sys = data;
vlc_error(log, "%s", msg);
vlc_error(sys->logger, "%s", msg);
}
static
......@@ -351,7 +355,8 @@ static int OpenCommon(vlc_object_t *obj)
free(path);
int val = json_parse(obj->logger, input, &sys->json);
struct ytdl_json jsdata = { s->obj.logger };
int val = json_parse(&jsdata, input, &sys->json);
kill(pid, SIGTERM);
fclose(input);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment