Hack for legacy Boost versions is no longer needed.
This commit is contained in:
parent
b454abd40f
commit
2ce852a050
|
@ -407,14 +407,7 @@ GstreamerPlayer :: getPosition(void) throw (std::logic_error)
|
|||
GstFormat fmt = GST_FORMAT_TIME;
|
||||
gst_element_query( decoder, GST_QUERY_POSITION, &fmt, &ns );
|
||||
|
||||
// this is necessary for boost version < 1.33.0
|
||||
gint64 us = ns / 1000LL;
|
||||
long s = us / 1000000LL;
|
||||
long frac_s = us % 1000000LL;
|
||||
length.reset(new time_duration(seconds(s) + microseconds(frac_s)));
|
||||
|
||||
// if we can be sure that boost >= 1.33.0, then we can write this instead:
|
||||
// length.reset(new time_duration(microseconds(ns / 1000LL)));
|
||||
length.reset(new time_duration(microseconds(ns / 1000LL)));
|
||||
|
||||
return length;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue