Skip to content

Commit

Permalink
seek error if media start time >0
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Nov 2, 2014
1 parent 31b150e commit d91dcca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AVDemuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ bool AVDemuxer::seek(qint64 pos)
}
//duration: unit is us (10^-6 s, AV_TIME_BASE)
qint64 upos = pos*1000LL;
if (upos > durationUs() || pos < 0LL) {
if (upos > startTimeUs() + durationUs() || pos < 0LL) {
qWarning("Invalid seek position %lld %.2f. valid range [0, %lld]", upos, double(upos)/double(durationUs()), durationUs());
return false;
}
Expand Down

0 comments on commit d91dcca

Please sign in to comment.