@torrent-tv/proxy 2.107.12 → 2.107.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.107.12",
3
+ "version": "2.107.13",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "repository": {
@@ -228,8 +228,14 @@ export class PacketIndex {
228
228
  return { kind: "terminal", reason: "video-copy-cut-is-not-a-keyframe" };
229
229
  }
230
230
  }
231
- // Coverage is established by the parser after its codec-required lookahead;
232
- // packets outside the interval are inspected but are not appended to input.
231
+ // A transcoder needs the first audio packet at or after the cut to flush
232
+ // samples decoded from the packet before it. The output filter still trims
233
+ // that lookahead to the requested interval. Video and copied audio do not
234
+ // need a packet beyond the cut.
235
+ if (track.type === "audio" && mode === "transcode" && ordered) {
236
+ const trailing = packets.firstAtOrAfter(to);
237
+ if (trailing < packets.length) last = Math.max(last, trailing);
238
+ }
233
239
  if (!track.complete && track.coveredThrough < to) {
234
240
  return { kind: "needs-index", trackId, from: startAt, to };
235
241
  }