mirror of
https://github.com/wang-bin/QtAV.git
synced 2026-10-28 19:16:48 +08:00
always set clock initial value #542
the force fps logic was changed recently. if sync to external clock and media start time != 0, clock initial value was not correctly set
This commit is contained in:
+2
-1
@@ -1,6 +1,6 @@
|
||||
/******************************************************************************
|
||||
QtAV: Media play library based on Qt and FFmpeg
|
||||
Copyright (C) 2012-2013 Wang Bin <wbsecg1@gmail.com>
|
||||
Copyright (C) 2012-2015 Wang Bin <wbsecg1@gmail.com>
|
||||
|
||||
* This file is part of QtAV
|
||||
|
||||
@@ -80,6 +80,7 @@ bool AVClock::isActive() const
|
||||
void AVClock::setInitialValue(double v)
|
||||
{
|
||||
value0 = v;
|
||||
qDebug("Clock initial value: %f", v);
|
||||
}
|
||||
|
||||
double AVClock::initialValue() const
|
||||
|
||||
+1
-2
@@ -1221,9 +1221,8 @@ void AVPlayer::playInternal()
|
||||
qDebug("Using AudioClock");
|
||||
masterClock()->setClockType(AVClock::AudioClock);
|
||||
}
|
||||
masterClock()->setInitialValue((double)absoluteMediaStartPosition()/1000.0);
|
||||
qDebug("Clock initial value: %f", masterClock()->value());
|
||||
}
|
||||
masterClock()->setInitialValue((double)absoluteMediaStartPosition()/1000.0);
|
||||
// from previous play()
|
||||
if (d->demuxer.audioCodecContext() && d->athread) {
|
||||
qDebug("Starting audio thread...");
|
||||
|
||||
Reference in New Issue
Block a user