File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change 365
365
(match bundle
366
366
[(struct* stream-bundle ([start-offset start-offset]
367
367
[file file ]))
368
- (when (and start-offset (not (= start-offset +inf.0 )))
369
- (with-handlers ([exn:fail?
370
- (λ (e)
371
- (log-video-warning "Cannot seek from ~a, starting from beginning "
372
- file ))])
373
- (define seek-point
374
- (exact-floor (/ (max 0 (- start-offset 1 ))
375
- AV-TIME-BASE)))
376
- (av-seek-frame avformat
377
- -1
378
- seek-point
379
- '(backwards))))]))
380
-
368
+ (when (and start-offset (not (= start-offset +inf.0 )))
369
+ (with-handlers ([exn:fail?
370
+ (λ (e)
371
+ (log-video-warning "Cannot seek from ~a, starting from beginning "
372
+ file ))])
373
+ (define seek-point
374
+ (exact-floor (* (max 0 (- start-offset 1 ))
375
+ AV-TIME-BASE)))
376
+ (av-seek-frame avformat
377
+ -1
378
+ seek-point
379
+ '(backwards))))]))
380
+
381
381
;; #t - More to read
382
382
;; #f - Done reading
383
383
(define/public (read-packet)
1245
1245
(log-video-debug "Video Graph Created: ~a " (graphviz g))
1246
1246
(log-video-debug "Filter Graph Created: ~a " g-str)
1247
1247
(define seek-points (get-seek-point g 0 ))
1248
- (log-video-info "Starting Streams at points: ~a " (for/hash ([(k v) (in-hash seek-points)])
1249
- (values (stream-bundle-file k) v)))
1248
+ (if seek?
1249
+ (log-video-info "Starting Streams at points: ~a " (for/hash ([(k v) (in-hash seek-points)])
1250
+ (values (stream-bundle-file k) v)))
1251
+ (log-video-info "Seeking disabled, starting from beginning of stream " ))
1250
1252
(define graph (avfilter-graph-alloc))
1251
1253
(define outputs
1252
1254
(for/fold ([ins '() ])
You can’t perform that action at this time.
0 commit comments