Skip to content

Commit 1e4462e

Browse files
committed
Bump version.
1 parent ca22666 commit 1e4462e

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

ffmpeg-player.el

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
;; Author: Shen, Jen-Chieh <[email protected]>
77
;; Description: Play video using ffmpeg.
88
;; Keyword: video ffmpeg buffering images
9-
;; Version: 0.1.5
9+
;; Version: 0.1.6
1010
;; Package-Requires: ((emacs "24.4") (s "1.12.0") (f "0.20.0"))
1111
;; URL: https://github.com/jcs090218/ffmpeg-player
1212

@@ -170,7 +170,7 @@
170170
(defvar ffmpeg-player--buffer nil "Buffer that displays video.")
171171
(defvar ffmpeg-player--buffer-timer nil "Timer that will update the image buffer.")
172172

173-
(defvar ffmpeg-player--resolve-clip-info-timer nil "Timer that try to resolve FPS.")
173+
(defvar ffmpeg-player--resolve-clip-info-timer nil "Timer that tries to resolve FPS.")
174174
(defvar ffmpeg-player--resolve-clip-info-time 0.2 "Time to check if fps could be resolved.")
175175

176176
(defvar ffmpeg-player--mute nil "Flag to check if nil.")
@@ -190,7 +190,7 @@
190190
"From the command for video by needed parameters.
191191
PATH is the input video file. SOURCE is the output image directory."
192192
(format ffmpeg-player--command-video-to-images
193-
path
193+
(shell-quote-argument path)
194194
(ffmpeg-player--form-command-list
195195
(list (format "-filter:v \"scale=w=%s:h=%s\"" ; Width & Height
196196
(ceiling ffmpeg-player-display-width)
@@ -205,7 +205,7 @@ PATH is the input video file. SOURCE is the output image directory."
205205
PATH is the input audio/video file. TIME is the start time.
206206
VOLUME of the sound from 0 ~ 100."
207207
(format ffmpeg-player--command-play-audio
208-
path
208+
(shell-quote-argument path)
209209
(ffmpeg-player--form-command-list
210210
(list "-nodisp" ; Don't display
211211
(format "-ss %s" time)
@@ -216,7 +216,7 @@ VOLUME of the sound from 0 ~ 100."
216216
(defun ffmpeg-player--message (fmt &rest args)
217217
"Message FMT and ARGS."
218218
(unless ffmpeg-player-no-message
219-
(apply 'message fmt args)))
219+
(apply #'message fmt args)))
220220

221221
(defun ffmpeg-player--inhibit-sentinel-messages (fun &rest args)
222222
"Inhibit messages in all sentinels started by FUN with ARGS."
@@ -277,7 +277,7 @@ VOLUME of the sound from 0 ~ 100."
277277
(let ((command (car command-line-args)))
278278
(start-process "ffmpeg-player--async-delete-directory"
279279
nil command "-Q" "--batch" "--eval"
280-
(format "(delete-directory \"%s\" t)" path))))
280+
(format "(delete-directory \"%s\" t)" (shell-quote-argument path)))))
281281

282282
(defun ffmpeg-player--clean-video-images ()
283283
"Clean up all video images."
@@ -318,7 +318,7 @@ VOLUME of the sound from 0 ~ 100."
318318
"Set the resolve clip information timer task."
319319
(ffmpeg-player--kill-resolve-clip-info-timer)
320320
(setq ffmpeg-player--resolve-clip-info-timer
321-
(run-with-timer ffmpeg-player--resolve-clip-info-time nil 'ffmpeg-player--check-resolve-clip-info)))
321+
(run-with-timer ffmpeg-player--resolve-clip-info-time nil #'ffmpeg-player--check-resolve-clip-info)))
322322

323323
(defun ffmpeg-player--kill-resolve-clip-info-timer ()
324324
"Kill the resolve clip information timer."
@@ -347,9 +347,8 @@ VOLUME of the sound from 0 ~ 100."
347347
"Get the duration from async shell command output buffer."
348348
(with-current-buffer (get-buffer ffmpeg-player--as-video-buffer-name)
349349
(goto-char (point-min))
350-
(let ((start-pt -1))
351-
(search-forward "Duration: ")
352-
(setq start-pt (1- (point)))
350+
(search-forward "Duration: ")
351+
(let ((start-pt (1- (point))))
353352
(search-forward ",")
354353
(substring (buffer-string) start-pt (- (point) 2)))))
355354

@@ -394,7 +393,7 @@ VOLUME of the sound from 0 ~ 100."
394393
(setq ffmpeg-player--buffer-time (/ 1.0 ffmpeg-player--current-fps)))
395394

396395
(defun ffmpeg-player--check-resolve-clip-info ()
397-
"Check if resolved clip inforamtion."
396+
"Check if resolved clip information."
398397
(if (not (ffmpeg-player--video-shell-output-p))
399398
(progn
400399
(message "[INFO] Waiting to resolve clip information")
@@ -441,7 +440,7 @@ Information about first frame timer please see variable `ffmpeg-player--first-fr
441440
"Set the buffer timer task."
442441
(ffmpeg-player--kill-buffer-timer)
443442
(setq ffmpeg-player--buffer-timer
444-
(run-with-timer ffmpeg-player--buffer-time nil 'ffmpeg-player--update-frame)))
443+
(run-with-timer ffmpeg-player--buffer-time nil #'ffmpeg-player--update-frame)))
445444

446445
(defun ffmpeg-player--kill-buffer-timer ()
447446
"Kill the buffer timer."
@@ -502,7 +501,7 @@ Information about first frame timer please see variable `ffmpeg-player--first-fr
502501
(if (not (ffmpeg-player--buffer-alive-p))
503502
(progn
504503
(ffmpeg-player--kill-sound-process)
505-
(user-error "[WARNING] Display buffer no longer alived"))
504+
(user-error "[WARNING] Display buffer no longer live"))
506505
(ffmpeg-player--calc-delta-time)
507506
(ffmpeg-player--update-frame-index)
508507
(ffmpeg-player--update-frame-info)))

0 commit comments

Comments
 (0)