viewer: if only video stream is still, don't use as rate in project explorer

Minor UI improvement
This commit is contained in:
itsmattkc
2021-04-29 11:26:11 +10:00
parent b66b1079fa
commit df861fb33d
+5 -6
View File
@@ -121,13 +121,12 @@ QString ViewerOutput::duration() const
QString ViewerOutput::rate() const
{
if (HasEnabledVideoStreams()) {
// This is a video editor, prioritize video streams
VideoParams video_stream = GetFirstEnabledVideoStream();
VideoParams video_stream;
if (video_stream.video_type() != VideoParams::kVideoTypeStill) {
return tr("%1 FPS").arg(video_stream.frame_rate().toDouble());
}
if (HasEnabledVideoStreams()
&& (video_stream = GetFirstEnabledVideoStream()).video_type() != VideoParams::kVideoTypeStill) {
// This is a video editor, prioritize video streams
return tr("%1 FPS").arg(video_stream.frame_rate().toDouble());
} else if (HasEnabledAudioStreams()) {
// No video streams, return audio
AudioParams audio_stream = GetFirstEnabledAudioStream();