From de194b48e5d8f612c5b2b2ac51f7cc824fbbd804 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 14 Mar 2013 01:38:21 +0100 Subject: [PATCH] vtl: fix crash if ffprobe returns zero fps --- gtk2_ardour/transcode_video_dialog.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/transcode_video_dialog.cc b/gtk2_ardour/transcode_video_dialog.cc index 8d927b915e..a4d0287399 100644 --- a/gtk2_ardour/transcode_video_dialog.cc +++ b/gtk2_ardour/transcode_video_dialog.cc @@ -157,10 +157,10 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile) t->attach (*l, 3, 4, 1, 2); osstream.str(""); - unsigned long sec = transcoder->get_duration() / transcoder->get_fps(); - if (sec == 0) { + if (transcoder->get_duration() == 0 || transcoder->get_fps() == 0) { osstream << _("??"); } else { + unsigned long sec = transcoder->get_duration() / transcoder->get_fps(); osstream << setfill('0') << setw(2); osstream << (sec / 3600) << ":"; osstream << setfill('0') << setw(2);