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
05c1c79d
Commit
05c1c79d
authored
Dec 07, 2017
by
sfan5
Committed by
Michael Niedermayer
Dec 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavcodec/hevcdec: implement skip_frame
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
cfd52094
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
hevcdec.c
libavcodec/hevcdec.c
+15
-1
No files found.
libavcodec/hevcdec.c
View file @
05c1c79d
...
...
@@ -2905,6 +2905,13 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
if
(
ret
<
0
)
return
ret
;
if
(
(
s
->
avctx
->
skip_frame
>=
AVDISCARD_BIDIR
&&
s
->
sh
.
slice_type
==
HEVC_SLICE_B
)
||
(
s
->
avctx
->
skip_frame
>=
AVDISCARD_NONINTRA
&&
s
->
sh
.
slice_type
!=
HEVC_SLICE_I
)
||
(
s
->
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
!
IS_IDR
(
s
)))
{
break
;
}
if
(
s
->
sh
.
first_slice_in_pic_flag
)
{
if
(
s
->
max_ra
==
INT_MAX
)
{
if
(
s
->
nal_unit_type
==
HEVC_NAL_CRA_NUT
||
IS_BLA
(
s
))
{
...
...
@@ -3028,7 +3035,14 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
/* decode the NAL units */
for
(
i
=
0
;
i
<
s
->
pkt
.
nb_nals
;
i
++
)
{
ret
=
decode_nal_unit
(
s
,
&
s
->
pkt
.
nals
[
i
]);
H2645NAL
*
nal
=
&
s
->
pkt
.
nals
[
i
];
if
(
s
->
avctx
->
skip_frame
>=
AVDISCARD_ALL
||
(
s
->
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
ff_hevc_nal_is_nonref
(
nal
->
type
)))
continue
;
ret
=
decode_nal_unit
(
s
,
nal
);
if
(
ret
<
0
)
{
av_log
(
s
->
avctx
,
AV_LOG_WARNING
,
"Error parsing NAL unit #%d.
\n
"
,
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