Skip to content

Commit

Permalink
Merge pull request #723 from aboba/main
Browse files Browse the repository at this point in the history
Set optimizeForLatency in decoder config
  • Loading branch information
Djuffin authored Sep 30, 2023
2 parents 3cd426f + 9a4ac54 commit 77944c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/encode-decode-worker/js/stream_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ class pipeline {
output: (chunk, cfg) => {
if (cfg.decoderConfig) {
cfg.decoderConfig.hardwareAcceleration = config.decHwAcceleration;
cfg.decoderConfig.optimizeForLatency = true;
if (config.latencyPref == 'quality') cfg.decoderConfig.optimizeForLatency = false;
const decoderConfig = JSON.stringify(cfg.decoderConfig);
self.postMessage({text: 'Configuration: ' + decoderConfig});
const configChunk =
Expand Down

0 comments on commit 77944c3

Please sign in to comment.