Skip to content

Commit

Permalink
Merge pull request #35 from Lumen5/seek-less
Browse files Browse the repository at this point in the history
Seek less
  • Loading branch information
antoineMoPa authored May 12, 2023
2 parents 5d1eb2a + e7e7236 commit 22225ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lumen5/framefusion",
"version": "0.0.17",
"version": "0.0.18",
"type": "module",
"scripts": {
"docs": "typedoc framefusion.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/backends/beamcoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export class BeamcoderExtractor extends BaseExtractor implements Extractor {
// seek and create a decoder when retrieving a frame for the first time or when seeking backwards
// we have to create a new decoder when seeking backwards as the decoder can only process frames in
// chronological order.
if (!this.#previousTargetPTS || this.#previousTargetPTS > targetPTS) {
if (this.#previousTargetPTS === null || this.#previousTargetPTS > targetPTS) {
await this.#demuxer.seek({
stream_index: 0, // even though we specify the stream index, it still seeks all streams
timestamp: targetPTS,
Expand Down

0 comments on commit 22225ea

Please sign in to comment.