mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
Do not display video FPS when unavailable
Do not try to display video FPS inside video tracks selection popover button. The FPS value can be zero for example when viewing pictures.
This commit is contained in:
@@ -142,11 +142,13 @@ class ClapperInterface extends Gtk.Grid
|
||||
switch(info.constructor) {
|
||||
case GstPlayer.PlayerVideoInfo:
|
||||
type = 'video';
|
||||
let fps = info.get_framerate();
|
||||
text = info.get_codec() + ', ' +
|
||||
+ info.get_width() + 'x'
|
||||
+ info.get_height() + '@'
|
||||
+ Number((fps[0] / fps[1]).toFixed(2));
|
||||
+ info.get_height();
|
||||
let fps = info.get_framerate();
|
||||
fps = Number((fps[0] / fps[1]).toFixed(2));
|
||||
if(fps)
|
||||
text += `@${fps}`;
|
||||
break;
|
||||
case GstPlayer.PlayerAudioInfo:
|
||||
type = 'audio';
|
||||
|
Reference in New Issue
Block a user