Hack for legacy Boost versions is no longer needed.
This commit is contained in:
parent
b454abd40f
commit
2ce852a050
1 changed files with 1 additions and 8 deletions
|
@ -407,14 +407,7 @@ GstreamerPlayer :: getPosition(void) throw (std::logic_error)
|
||||||
GstFormat fmt = GST_FORMAT_TIME;
|
GstFormat fmt = GST_FORMAT_TIME;
|
||||||
gst_element_query( decoder, GST_QUERY_POSITION, &fmt, &ns );
|
gst_element_query( decoder, GST_QUERY_POSITION, &fmt, &ns );
|
||||||
|
|
||||||
// this is necessary for boost version < 1.33.0
|
length.reset(new time_duration(microseconds(ns / 1000LL)));
|
||||||
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)));
|
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue