Commit 8a4ba8d6 authored by Mladen Milinkovic's avatar Mladen Milinkovic
Browse files

Fixed clang-7.0.0 build

parent 0b59b3fe
......@@ -325,7 +325,7 @@ AudioDecoder::syncAudio(int nbSamples)
double diff = m_vs->audClk.get() - m_vs->masterTime();
if(!isnan(diff) && fabs(diff) < AV_NOSYNC_THRESHOLD) {
if(!std::isnan(diff) && fabs(diff) < AV_NOSYNC_THRESHOLD) {
m_diffCum = diff + m_diffAvgCoef * m_diffCum;
if(m_diffAvgCount < AUDIO_DIFF_AVG_NB) {
// not enough measures to have a correct estimate
......@@ -449,7 +449,7 @@ AudioDecoder::getFrame(AVFrame *frame)
const double dPts = double(frame->pts) / frame->sample_rate;
if(!isnan(dPts) && m_vs->seekDecoder > 0. && m_vs->seekDecoder > dPts) {
if(!std::isnan(dPts) && m_vs->seekDecoder > 0. && m_vs->seekDecoder > dPts) {
av_frame_unref(frame);
return 0;
}
......@@ -515,7 +515,7 @@ AudioDecoder::run()
while(!m_vs->abortRequested) {
ALint hwBufOffset = 0;
alGetSourcei(m_alSrc, AL_BYTE_OFFSET, &hwBufOffset);
if(!isnan(af->pts)) {
if(!std::isnan(af->pts)) {
m_vs->audClk.setAt(
af->pts - double(m_hwBufQueueSize - hwBufOffset) / m_fmtTgt.bytesPerSec,
af->serial,
......
......@@ -93,6 +93,6 @@ Clock::syncTo(Clock *other)
{
double clock = get();
double otherClock = other->get();
if(!isnan(otherClock) && (isnan(clock) || fabs(clock - otherClock) > AV_NOSYNC_THRESHOLD))
if(!std::isnan(otherClock) && (std::isnan(clock) || fabs(clock - otherClock) > AV_NOSYNC_THRESHOLD))
set(otherClock, other->m_serial);
}
......@@ -114,7 +114,7 @@ FFPlayer::stepFrame(int frameCnt)
// TODO: FIXME: backward stepping is broken
double seek_seconds = m_vs->vidClk.pts(); // maxrd2: was m_vs->extclk.pts
if(isnan(seek_seconds))
if(std::isnan(seek_seconds))
return; // maxrd2: was seek_seconds = m_vs->extclk.pts;
seek_seconds += double(frameCnt - 1) / av_q2d(st->r_frame_rate);
seek(seek_seconds);
......
......@@ -114,7 +114,7 @@ retry:
m_vs->frameTimer = time;
m_vs->vidFQ.m_mutex->lock();
if(!isnan(vp->pts))
if(!std::isnan(vp->pts))
updateVideoPts(vp->pts, vp->pos, vp->serial);
m_vs->vidFQ.m_mutex->unlock();
......@@ -193,7 +193,7 @@ RenderThread::vpDuration(Frame *vp, Frame *nextvp)
{
if(vp->serial == nextvp->serial) {
double duration = nextvp->pts - vp->pts;
if(isnan(duration) || duration <= 0 || duration > m_vs->maxFrameDuration)
if(std::isnan(duration) || duration <= 0 || duration > m_vs->maxFrameDuration)
return vp->duration;
else
return duration;
......@@ -223,7 +223,7 @@ RenderThread::computeTargetDelay(double delay)
// skip or repeat frame. We take into account the delay to compute the threshold.
// I still don't know if it is the best guess
sync_threshold = FFMAX(AV_SYNC_THRESHOLD_MIN, FFMIN(AV_SYNC_THRESHOLD_MAX, delay));
if(!isnan(diff) && fabs(diff) < m_vs->maxFrameDuration) {
if(!std::isnan(diff) && fabs(diff) < m_vs->maxFrameDuration) {
if(diff <= -sync_threshold)
delay = FFMAX(0, delay + diff);
else if(diff >= sync_threshold && delay > AV_SYNC_FRAMEDUP_THRESHOLD)
......
......@@ -48,14 +48,14 @@ VideoDecoder::getVideoFrame(AVFrame *frame)
if(frame->pts != AV_NOPTS_VALUE) {
const double dPts = m_timeBase * frame->pts;
if(m_vs->seekDecoder > 0. && !isnan(dPts) && m_vs->seekDecoder > dPts) {
if(m_vs->seekDecoder > 0. && !std::isnan(dPts) && m_vs->seekDecoder > dPts) {
m_frameDropsEarly++;
av_frame_unref(frame);
return 0;
}
if(m_vs->framedrop > 0 || (m_vs->framedrop && m_vs->masterSyncType() != AV_SYNC_VIDEO_MASTER)) {
const double diff = dPts - m_vs->masterTime();
if(!isnan(diff) && diff < 0 && fabs(diff) < AV_NOSYNC_THRESHOLD
if(!std::isnan(diff) && diff < 0 && fabs(diff) < AV_NOSYNC_THRESHOLD
&& pktSerial() == m_vs->vidClk.serial() && m_queue->nbPackets()) {
m_frameDropsEarly++;
av_frame_unref(frame);
......
......@@ -122,7 +122,7 @@ private:
inline double position() {
const double pos = masterTime();
return isnan(pos) ? double(seekPos) / AV_TIME_BASE : pos;
return std::isnan(pos) ? double(seekPos) / AV_TIME_BASE : pos;
}
int masterSyncType();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment