fix sigfpe on timecode function if the timebase isn't valid
This commit is contained in:
@@ -33,15 +33,14 @@ QString olive::timestamp_to_timecode(const int64_t ×tamp,
|
||||
const TimecodeDisplay& display,
|
||||
bool show_plus_if_positive)
|
||||
{
|
||||
if (timebase.isNull()) {
|
||||
return QString();
|
||||
}
|
||||
|
||||
double timestamp_dbl = (rational(timestamp) * timebase).toDouble();
|
||||
|
||||
switch (display) {
|
||||
case kTimecodeNonDropFrame:
|
||||
// Convert timestamp from drop frame to non-drop frame
|
||||
if (timebase.numerator() == 1001) {
|
||||
timestamp_dbl = timestamp_dbl / timebase.flipped().toDouble() * (static_cast<double>(timebase.denominator())/1000.0);
|
||||
}
|
||||
/* fall-through */
|
||||
case kTimecodeDropFrame:
|
||||
case kTimecodeSeconds:
|
||||
{
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "crossdissolvetransition.h"
|
||||
|
||||
CrossDissolveTransition::CrossDissolveTransition()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef CROSSDISSOLVETRANSITION_H
|
||||
#define CROSSDISSOLVETRANSITION_H
|
||||
|
||||
|
||||
class CrossDissolveTransition
|
||||
{
|
||||
public:
|
||||
CrossDissolveTransition();
|
||||
};
|
||||
|
||||
#endif // CROSSDISSOLVETRANSITION_H
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "diptoblacktransition.h"
|
||||
|
||||
DipToBlackTransition::DipToBlackTransition()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef DIPTOBLACKTRANSITION_H
|
||||
#define DIPTOBLACKTRANSITION_H
|
||||
|
||||
|
||||
class DipToBlackTransition
|
||||
{
|
||||
public:
|
||||
DipToBlackTransition();
|
||||
};
|
||||
|
||||
#endif // DIPTOBLACKTRANSITION_H
|
||||
Reference in New Issue
Block a user