projects
/
platform
/
upstream
/
libvpx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
972149c
)
svc: Fix a case where target bandwidth is 0
author
Jerome Jiang
<jianj@google.com>
Wed, 29 Mar 2023 17:06:19 +0000
(13:06 -0400)
committer
Jerome Jiang
<jianj@google.com>
Wed, 29 Mar 2023 17:06:19 +0000
(13:06 -0400)
Bug: webrtc:15033
Change-Id: Iea2997c2ce8982f106a1eed3ec4f7dd1c6e83666
vp9/encoder/vp9_svc_layercontext.c
patch
|
blob
|
history
diff --git
a/vp9/encoder/vp9_svc_layercontext.c
b/vp9/encoder/vp9_svc_layercontext.c
index
ac8b09c
..
83b6e5c
100644
(file)
--- a/
vp9/encoder/vp9_svc_layercontext.c
+++ b/
vp9/encoder/vp9_svc_layercontext.c
@@
-254,7
+254,9
@@
void vp9_update_layer_context_change_config(VP9_COMP *const cpi,
lc->target_bandwidth = oxcf->layer_target_bitrate[layer];
- bitrate_alloc = (float)lc->target_bandwidth / target_bandwidth;
+ if (target_bandwidth != 0) {
+ bitrate_alloc = (float)lc->target_bandwidth / target_bandwidth;
+ }
// Update buffer-related quantities.
lrc->starting_buffer_level =
(int64_t)(rc->starting_buffer_level * bitrate_alloc);