Commit 8bb612c8 authored by Julian Rother's avatar Julian Rother

transcode: Fix filename usage for output format detection

If movs faststart option is set, the muxer will try to reopen the
output file using the path passed to avformat_alloc_output_context2
instead of the one passed to avio_open.
parent 28b5ce61
......@@ -267,8 +267,9 @@ int main(int argc, char *argv[])
for (p = jenter(jlookup(input, "streams")); p; p = jnext(p))
setup_input_stream(p, demux, decs, fg, srcs, &inpads);
err = avformat_alloc_output_context2(&mux, 0,
jstr(jlookup(output, "format"), 0), outpath);
err = avformat_alloc_output_context2(&mux,
av_guess_format(jstr(jlookup(output, "format"), 0), outpath, 0), 0,
tmppath);
if (err < 0)
job_failed("Error allocating muxer context: %s", av_err2str(err));
parse_dict(&mux->metadata, jlookup(output, "metadata"));
......
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