diff --git a/ffmpeg-myth.scm b/ffmpeg-myth.scm index ebed68d..73cc25b 100755 --- a/ffmpeg-myth.scm +++ b/ffmpeg-myth.scm @@ -298,10 +298,9 @@ (define (recording-new-file-name file-name ending) - (let* ((old-ending (substring file-name (- (string-length file-name) 3))) - (n (- (string-length file-name) (if (string=? old-ending ".ts") 3 4)))) - (simple-format #f "~a.~a" (substring file-name 0 n) ending))) - + (let* ((base+exts (string-split file-name #\.)) + (base (car base+exts))) + (simple-format #f "~a.~a" base ending))) (define* (create-record-data-for-transcode rec) (let* ((rtn-list '()) (tr-rec rec)