Commit 166d04c9 authored by Julian Rother's avatar Julian Rother

transcode: Hopefully fixed last commit

parent b8297817
Pipeline #453 passed with stage
in 6 minutes and 30 seconds
......@@ -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"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment