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
1dd02192
Commit
1dd02192
authored
Nov 20, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hevc: clear unused refs on failure
parent
f9f883af
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
hevc_refs.c
libavcodec/hevc_refs.c
+5
-4
No files found.
libavcodec/hevc_refs.c
View file @
1dd02192
...
@@ -390,7 +390,7 @@ int ff_hevc_frame_rps(HEVCContext *s)
...
@@ -390,7 +390,7 @@ int ff_hevc_frame_rps(HEVCContext *s)
const
ShortTermRPS
*
short_rps
=
s
->
sh
.
short_term_rps
;
const
ShortTermRPS
*
short_rps
=
s
->
sh
.
short_term_rps
;
const
LongTermRPS
*
long_rps
=
&
s
->
sh
.
long_term_rps
;
const
LongTermRPS
*
long_rps
=
&
s
->
sh
.
long_term_rps
;
RefPicList
*
rps
=
s
->
rps
;
RefPicList
*
rps
=
s
->
rps
;
int
i
,
ret
;
int
i
,
ret
=
0
;
if
(
!
short_rps
)
{
if
(
!
short_rps
)
{
rps
[
0
].
nb_refs
=
rps
[
1
].
nb_refs
=
0
;
rps
[
0
].
nb_refs
=
rps
[
1
].
nb_refs
=
0
;
...
@@ -424,7 +424,7 @@ int ff_hevc_frame_rps(HEVCContext *s)
...
@@ -424,7 +424,7 @@ int ff_hevc_frame_rps(HEVCContext *s)
ret
=
add_candidate_ref
(
s
,
&
rps
[
list
],
poc
,
HEVC_FRAME_FLAG_SHORT_REF
);
ret
=
add_candidate_ref
(
s
,
&
rps
[
list
],
poc
,
HEVC_FRAME_FLAG_SHORT_REF
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
goto
fail
;
}
}
/* add the long refs */
/* add the long refs */
...
@@ -434,14 +434,15 @@ int ff_hevc_frame_rps(HEVCContext *s)
...
@@ -434,14 +434,15 @@ int ff_hevc_frame_rps(HEVCContext *s)
ret
=
add_candidate_ref
(
s
,
&
rps
[
list
],
poc
,
HEVC_FRAME_FLAG_LONG_REF
);
ret
=
add_candidate_ref
(
s
,
&
rps
[
list
],
poc
,
HEVC_FRAME_FLAG_LONG_REF
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
goto
fail
;
}
}
fail:
/* release any frames that are now unused */
/* release any frames that are now unused */
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
s
->
DPB
);
i
++
)
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
s
->
DPB
);
i
++
)
ff_hevc_unref_frame
(
s
,
&
s
->
DPB
[
i
],
0
);
ff_hevc_unref_frame
(
s
,
&
s
->
DPB
[
i
],
0
);
return
0
;
return
ret
;
}
}
int
ff_hevc_compute_poc
(
HEVCContext
*
s
,
int
poc_lsb
)
int
ff_hevc_compute_poc
(
HEVCContext
*
s
,
int
poc_lsb
)
...
...
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