vtl: fix crash if ffprobe returns zero fps
This commit is contained in:
parent
b15e8da3fd
commit
de194b48e5
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user