Skip to content
Snippets Groups Projects
Commit 166d04c9 authored by Julian Rother's avatar Julian Rother
Browse files

transcode: Hopefully fixed last commit

parent b8297817
Branches
No related tags found
No related merge requests found
Pipeline #453 passed
......@@ -250,7 +250,7 @@ void connect_pads(AVFilterInOut **ins, AVFilterInOut **outs)
int main(int argc, char *argv[])
{
int err, i, progress, _progress, canceled;
char *p, *input, *output, *inpath, *outpath, *tmppath, *oldsrcpath;
char *p, *input, *output, *inpath, *outdir, *outpath, *tmppath, *oldsrcpath;
AVFormatContext *demux, *mux;
AVCodecContext **decs, **encs;
AVFilterContext **srcs, **sinks;
......@@ -276,6 +276,9 @@ int main(int argc, char *argv[])
input = jlookup(argv[4], "input");
inpath = buildpath(getenv(WORKER_RAW), jstr(jlookup(input, "path"), 0));
output = jlookup(argv[4], "output");
outdir = buildpath(getenv(WORKER_RELEASED), dirname(jstr(jlookup(output, "path"), 0)));
if (access(outdir, F_OK) && mkdir(outdir, 02775))
job_failed("Could not create target directory \"%s\": %s", outdir, strerror(errno));
outpath = buildpath(getenv(WORKER_RELEASED), jstr(jlookup(output, "path"), 0));
tmppath = mprintf("%s/.tmp-%i", getenv(WORKER_TMP), jobid);
if (oldsrcpath = jstr(jlookup(argv[4], "srcpath"), 0))
......@@ -283,8 +286,6 @@ int main(int argc, char *argv[])
else
oldsrcpath = "/var/empty/nosource";
overwrite_check(outpath, oldsrcpath, jstr(jlookup(argv[4], "srchash"), ""));
if (access(dirname(outpath), F_OK) && mkdir(dirname(outpath), 02775))
job_failed("Could not create target directory \"%s\": %s", dirname(outpath), strerror(errno));
demux = 0;
opts = 0;
parse_dict(&opts, jlookup(input, "options"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment