projects
/
libde265.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39b9a1c
)
[PATCH] fix streams where SPS image size changes without refreshing PPS (#299)
author
Dirk Farin
<dirk.farin@gmail.com>
Tue, 5 Apr 2022 16:41:28 +0000
(18:41 +0200)
committer
Tobias Frost
<tobi@debian.org>
Tue, 24 Jan 2023 21:39:16 +0000
(21:39 +0000)
Gbp-Pq: Name CVE-2021-36408.patch
libde265/decctx.cc
patch
|
blob
|
history
diff --git
a/libde265/decctx.cc
b/libde265/decctx.cc
index edebb71362777cfc5041b9bbdc7ea28f89b05940..6701725fbe0c6cecdbdd1d1cff1b514a45fb69a1 100644
(file)
--- a/
libde265/decctx.cc
+++ b/
libde265/decctx.cc
@@
-562,6
+562,15
@@
de265_error decoder_context::read_sps_NAL(bitreader& reader)
sps[ new_sps->seq_parameter_set_id ] = new_sps;
+ // Remove the all PPS that referenced the old SPS because parameters may have changed and we do not want to
+ // get the SPS and PPS parameters (e.g. image size) out of sync.
+
+ for (auto& p : pps) {
+ if (p && p->seq_parameter_set_id == new_sps->seq_parameter_set_id) {
+ p = nullptr;
+ }
+ }
+
return DE265_OK;
}