13
0

vtl: fix crash if ffprobe returns zero fps

This commit is contained in:
Robin Gareus 2013-03-14 01:38:21 +01:00
parent b15e8da3fd
commit de194b48e5

View File

@ -157,10 +157,10 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile)
t->attach (*l, 3, 4, 1, 2); t->attach (*l, 3, 4, 1, 2);
osstream.str(""); osstream.str("");
unsigned long sec = transcoder->get_duration() / transcoder->get_fps(); if (transcoder->get_duration() == 0 || transcoder->get_fps() == 0) {
if (sec == 0) {
osstream << _("??"); osstream << _("??");
} else { } else {
unsigned long sec = transcoder->get_duration() / transcoder->get_fps();
osstream << setfill('0') << setw(2); osstream << setfill('0') << setw(2);
osstream << (sec / 3600) << ":"; osstream << (sec / 3600) << ":";
osstream << setfill('0') << setw(2); osstream << setfill('0') << setw(2);