Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit f3cce3e

Browse files
thegobottaste1981
authored andcommitted
Update h264_encoder_impl.cc (#103)
1 parent e4c5580 commit f3cce3e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

modules/video_coding/codecs/h264/h264_encoder_impl.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,15 @@ SEncParamExt H264EncoderImpl::CreateEncoderParams(size_t i) const {
528528
} else {
529529
RTC_NOTREACHED();
530530
}
531+
532+
// Reuse SPS id if possible. This helps to avoid reset of chromium HW decoder
533+
// on each key-frame.
534+
// Note that WebRTC resets encoder on resolution change which makes all
535+
// EParameterSetStrategy modes except INCREASING_ID (default) essentially
536+
// equivalent to CONSTANT_ID.
537+
//https://bugs.chromium.org/p/chromium/issues/detail?id=1111273
538+
encoder_params.eSpsPpsIdStrategy = SPS_LISTING;
539+
531540
encoder_params.iPicWidth = configurations_[i].width;
532541
encoder_params.iPicHeight = configurations_[i].height;
533542
encoder_params.iTargetBitrate = configurations_[i].target_bps;

0 commit comments

Comments
 (0)