Commit 83c32643 authored by Julian Rother's avatar Julian Rother

Fixes for live_forward

parent f1cf6092
Pipeline #182 passed with stage
in 5 minutes and 6 seconds
......@@ -52,6 +52,7 @@ int main(int argc, char *argv[])
mux->streams[i]->codecpar->codec_tag = 0;
mux->streams[i]->time_base = demux->streams[i]->time_base;
}
avio_open(&mux->pb, dest, AVIO_FLAG_WRITE);
muxopts = 0;
parse_dict(&muxopts, jlookup(argv[4], "options"));
if ((err = avformat_write_header(mux, &muxopts)) < 0)
......@@ -60,7 +61,7 @@ int main(int argc, char *argv[])
while (!canceled && !av_read_frame(demux, &pkt))
{
if (!checktime(30))
canceled = ping_job(jobid, "running", 0);
canceled = ping_job(jobid, "running", "{\"log\": \"%s\"}", jescape(get_avlogbuf()));
if (pkt.stream_index >= demux->nb_streams
|| idxmap[pkt.stream_index] == -1)
continue;
......@@ -79,6 +80,7 @@ int main(int argc, char *argv[])
av_interleaved_write_frame(mux, 0);
if (err = av_write_trailer(mux))
job_failed("Error writing trailer", av_err2str(err));
avio_closep(&mux->pb);
ping_job(jobid, "finished", "{%s, \"log\": \"%s\"}", jescape(get_avlogbuf()));
return 0;
}
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