Skip to content

Commit

Permalink
fix: changeType on full codec change only (#1474)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Feb 3, 2024
1 parent 64376db commit 4e51778
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/source-updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,13 @@ const actions = {
}

// do not update codec if we don't need to.
if (sourceUpdater.codecs[type] === codec) {
// Only update if we change the codec base.
// For example, going from avc1.640028 to avc1.64001f does not require a changeType call.
const newCodecBase = codec.substring(0, codec.indexOf('.'));
const oldCodec = sourceUpdater.codecs[type];
const oldCodecBase = oldCodec.substring(0, oldCodec.indexOf('.'));

if (oldCodecBase === newCodecBase) {
return;
}

Expand Down

0 comments on commit 4e51778

Please sign in to comment.