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

Commit 014d290

Browse files
authored
Update h264_encoder_impl.cc (#103)
1 parent 6522279 commit 014d290

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
@@ -539,6 +539,15 @@ SEncParamExt H264EncoderImpl::CreateEncoderParams(size_t i) const {
539539
} else {
540540
RTC_NOTREACHED();
541541
}
542+
543+
// Reuse SPS id if possible. This helps to avoid reset of chromium HW decoder
544+
// on each key-frame.
545+
// Note that WebRTC resets encoder on resolution change which makes all
546+
// EParameterSetStrategy modes except INCREASING_ID (default) essentially
547+
// equivalent to CONSTANT_ID.
548+
//https://bugs.chromium.org/p/chromium/issues/detail?id=1111273
549+
encoder_params.eSpsPpsIdStrategy = SPS_LISTING;
550+
542551
encoder_params.iPicWidth = configurations_[i].width;
543552
encoder_params.iPicHeight = configurations_[i].height;
544553
encoder_params.iTargetBitrate = configurations_[i].target_bps;

0 commit comments

Comments
 (0)