mythtv-make-concat-list: handle empty cut list

If cut list is empty, set it to ((0 0)), so that concat list ends up
being ((0 N)) where N is either the last i-frame number or

When fed to the concat filter in ffmpeg-split+transcode-recording, the
recording will be transcoded.
This commit is contained in:
Leo Butler 2021-01-21 20:24:25 -06:00
parent f3c0d86d71
commit def854296e
1 changed files with 4 additions and 2 deletions

View File

@ -193,8 +193,10 @@
(cl (cddr l) (if (< (caar l) (caadr l)) (append (list (cons (caar l) (caadr l))) acc) acc)))
(cl (cdr l) acc)))))
(if (and (start-of-cut? (cadar s)) (> (caar s) 0))
(set! s (append '((0 0)) s)))
(cond ((null? s)
(set! s '((0 0))))
((and (start-of-cut? (cadar s)) (> (caar s) 0))
(set! s (append '((0 0)) s))))
(if (end-of-cut? (cadr (last s)))
(set! s (append s (list (list (if (null? f) (greatest-fixnum) (caar f)) 1)))))
(set! s (map (lambda(x) (if (start-of-cut? (cadr x)) (cons (car x) start) (cons (car x) end)))