Skip to content

Commit

Permalink
Fix seeking in timeshift
Browse files Browse the repository at this point in the history
In case of re-aligning the segments, use the first PTS as starting
point.

Use double instead of float
  • Loading branch information
rbuehlma committed Jul 9, 2017
1 parent 01b3e7e commit e6c3d95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,7 @@ bool CInputStreamAdaptive::DemuxSeekTime(double time, bool backwards, double &st

kodi::Log(ADDON_LOG_INFO, "DemuxSeekTime (%0.4lf)", time);

return m_session->SeekTime(time * 0.001f, 0, !backwards);
return m_session->SeekTime(time * 0.001l, 0, !backwards);
}

//callback - will be called from kodi
Expand Down
2 changes: 1 addition & 1 deletion src/parser/DASHTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ end(void *data, const char *el)
continue;
std::vector<uint32_t>::const_iterator sdb(dash->current_adaptationset_->segment_durations_.data.begin()),
sde(dash->current_adaptationset_->segment_durations_.data.end());
uint64_t spts(0);
uint64_t spts((*b)->segments_[0]->startPTS_);
for (std::vector<DASHTree::Segment>::iterator sb((*b)->segments_.data.begin()), se((*b)->segments_.data.end()); sb != se && sdb != sde; ++sb, ++sdb)
{
sb->startPTS_ = spts;
Expand Down

0 comments on commit e6c3d95

Please sign in to comment.