Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
ffworker
Commits
83c32643
Commit
83c32643
authored
Jul 18, 2018
by
Julian Rother
Browse files
Fixes for live_forward
parent
f1cf6092
Pipeline
#182
passed with stage
in 5 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
live_forward.c
View file @
83c32643
...
...
@@ -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
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment