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
e5ac554b
Commit
e5ac554b
authored
Jan 18, 2017
by
Clément Bœsch
Committed by
Clément Bœsch
Jan 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/h264: simplify find_unused_picture()
parent
bcfa8551
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
h264_slice.c
libavcodec/h264_slice.c
+3
-13
No files found.
libavcodec/h264_slice.c
View file @
e5ac554b
...
...
@@ -254,25 +254,15 @@ fail:
return
(
ret
<
0
)
?
ret
:
AVERROR
(
ENOMEM
);
}
static
inline
int
pic_is_unused
(
H264Context
*
h
,
H264Picture
*
pic
)
{
if
(
!
pic
->
f
->
buf
[
0
])
return
1
;
return
0
;
}
static
int
find_unused_picture
(
H264Context
*
h
)
{
int
i
;
for
(
i
=
0
;
i
<
H264_MAX_PICTURE_COUNT
;
i
++
)
{
if
(
pic_is_unused
(
h
,
&
h
->
DPB
[
i
])
)
break
;
if
(
!
h
->
DPB
[
i
].
f
->
buf
[
0
]
)
return
i
;
}
if
(
i
==
H264_MAX_PICTURE_COUNT
)
return
AVERROR_INVALIDDATA
;
return
i
;
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