Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f94b4f16
Commit
f94b4f16
authored
Mar 09, 2019
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mpegts: Simplify score compare
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
0a84ba26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
mpegts.c
libavformat/mpegts.c
+6
-6
No files found.
libavformat/mpegts.c
View file @
f94b4f16
...
...
@@ -620,16 +620,16 @@ static int get_packet_size(AVFormatContext* s)
av_log
(
s
,
AV_LOG_TRACE
,
"Probe: %d, score: %d, dvhs_score: %d, fec_score: %d
\n
"
,
buf_size
,
score
,
dvhs_score
,
fec_score
);
margin
=
mid_pred
(
score
,
fec_score
,
dvhs_score
);
if
(
buf_size
<
PROBE_PACKET_MAX_BUF
)
margin
=
PROBE_PACKET_MARGIN
;
/*if buffer not filled */
else
margin
=
0
;
margin
+=
PROBE_PACKET_MARGIN
;
/*if buffer not filled */
if
(
score
>
FFMAX
(
fec_score
,
dvhs_score
)
+
margin
)
if
(
score
>
margin
)
return
TS_PACKET_SIZE
;
else
if
(
dvhs_score
>
FFMAX
(
score
,
fec_score
)
+
margin
)
else
if
(
dvhs_score
>
margin
)
return
TS_DVHS_PACKET_SIZE
;
else
if
(
fec_score
>
FFMAX
(
score
,
dvhs_score
)
+
margin
)
else
if
(
fec_score
>
margin
)
return
TS_FEC_PACKET_SIZE
;
}
return
AVERROR_INVALIDDATA
;
...
...
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