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
29860cc8
Commit
29860cc8
authored
May 19, 2005
by
Loren Merritt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix crash on negative POC
Originally committed as revision 4278 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d3076955
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
h264.c
libavcodec/h264.c
+3
-3
No files found.
libavcodec/h264.c
View file @
29860cc8
...
@@ -3156,11 +3156,11 @@ static int fill_default_ref_list(H264Context *h){
...
@@ -3156,11 +3156,11 @@ static int fill_default_ref_list(H264Context *h){
if
(
h
->
slice_type
==
B_TYPE
){
if
(
h
->
slice_type
==
B_TYPE
){
int
out_i
;
int
out_i
;
int
limit
=
-
1
;
int
limit
=
INT_MIN
;
/* sort frame according to poc in B slice */
/* sort frame according to poc in B slice */
for
(
out_i
=
0
;
out_i
<
h
->
short_ref_count
;
out_i
++
){
for
(
out_i
=
0
;
out_i
<
h
->
short_ref_count
;
out_i
++
){
int
best_i
=
-
1
;
int
best_i
=
INT_MIN
;
int
best_poc
=
INT_MAX
;
int
best_poc
=
INT_MAX
;
for
(
i
=
0
;
i
<
h
->
short_ref_count
;
i
++
){
for
(
i
=
0
;
i
<
h
->
short_ref_count
;
i
++
){
...
@@ -3171,7 +3171,7 @@ static int fill_default_ref_list(H264Context *h){
...
@@ -3171,7 +3171,7 @@ static int fill_default_ref_list(H264Context *h){
}
}
}
}
assert
(
best_i
!=
-
1
);
assert
(
best_i
!=
INT_MIN
);
limit
=
best_poc
;
limit
=
best_poc
;
sorted_short_ref
[
out_i
]
=
*
h
->
short_ref
[
best_i
];
sorted_short_ref
[
out_i
]
=
*
h
->
short_ref
[
best_i
];
...
...
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