Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
9a7bce31
Commit
9a7bce31
authored
Jul 17, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLS: check that input mpegts files have not been prepared in hls-prepare
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
dbe81d5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
hls.cc
src/hls.cc
+19
-4
No files found.
src/hls.cc
View file @
9a7bce31
...
...
@@ -189,14 +189,14 @@ hls_add (const string& infile, const string& outfile, const string& bits)
Error
err
=
reader
.
load
(
infile
);
if
(
err
)
{
error
(
"hls
_mark
: %s
\n
"
,
err
.
message
());
error
(
"hls: %s
\n
"
,
err
.
message
());
return
1
;
}
const
TSReader
::
Entry
*
full_flac
=
reader
.
find
(
"full.flac"
);
if
(
!
full_flac
)
{
error
(
"hls
_mark
: no embedded context found in %s
\n
"
,
infile
.
c_str
());
error
(
"hls: no embedded context found in %s
\n
"
,
infile
.
c_str
());
return
1
;
}
...
...
@@ -204,7 +204,7 @@ hls_add (const string& infile, const string& outfile, const string& bits)
err
=
in_stream
.
open
(
&
full_flac
->
data
);
if
(
err
)
{
error
(
"hls
_mark
: %s
\n
"
,
err
.
message
());
error
(
"hls: %s
\n
"
,
err
.
message
());
return
1
;
}
...
...
@@ -277,8 +277,23 @@ bit_rate_from_m3u8 (const string& m3u8, const WavData& wav_data, int& bit_rate)
Error
validate_input_segment
(
const
string
&
filename
)
{
TSReader
reader
;
Error
err
=
reader
.
load
(
filename
);
if
(
err
)
{
error
(
"audiowmark: hls: failed to read mpegts input file: %s
\n
"
,
filename
.
c_str
());
return
err
;
}
if
(
reader
.
entries
().
size
())
{
error
(
"audiowmark: hls: file appears to be already prepared: %s
\n
"
,
filename
.
c_str
());
return
Error
(
"input for hls-prepare must not contain context"
);
}
vector
<
string
>
format_out
;
Error
err
=
run
({
"ffprobe"
,
"-v"
,
"error"
,
"-print_format"
,
"compact"
,
"-show_streams"
,
filename
},
&
format_out
);
err
=
run
({
"ffprobe"
,
"-v"
,
"error"
,
"-print_format"
,
"compact"
,
"-show_streams"
,
filename
},
&
format_out
);
if
(
err
)
{
error
(
"audiowmark: hls: failed to validate input file: %s
\n
"
,
filename
.
c_str
());
...
...
Write
Preview
Markdown
is supported
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