[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15222] branches/soc-2007-hcube/extern/ tinySND/ffmpeg/ffmpegReader.cpp: remove warnings
Csaba Hruska
csaba.hruska at gmail.com
Sat Jun 14 19:31:44 CEST 2008
Revision: 15222
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15222
Author: hcube
Date: 2008-06-14 19:31:23 +0200 (Sat, 14 Jun 2008)
Log Message:
-----------
remove warnings
Modified Paths:
--------------
branches/soc-2007-hcube/extern/tinySND/ffmpeg/ffmpegReader.cpp
Modified: branches/soc-2007-hcube/extern/tinySND/ffmpeg/ffmpegReader.cpp
===================================================================
--- branches/soc-2007-hcube/extern/tinySND/ffmpeg/ffmpegReader.cpp 2008-06-14 17:12:49 UTC (rev 15221)
+++ branches/soc-2007-hcube/extern/tinySND/ffmpeg/ffmpegReader.cpp 2008-06-14 17:31:23 UTC (rev 15222)
@@ -137,7 +137,7 @@
// NOT SUPPORTED YET: unknown duration
return;
}
- mDuration = mFormatCtx->duration / AV_TIME_BASE;
+ mDuration = float(mFormatCtx->duration) / float(AV_TIME_BASE);
mNumFrames = (int)(mSampleRate * mDuration);
mIsSeekable = true; // !!!! UNIMPLEMENTED YET !!!!
@@ -150,6 +150,8 @@
mNumRemainedFrames = 0;
mPktBufferSize = 0;
mPkt.data = 0;
+ mSeekReq = false;
+ mFrameCounter = 0;
mIsFormatSupported = true;
printf("ffmpeg reader ok: %s\n", filename);
@@ -180,14 +182,13 @@
return;
}
- double pos = frameNum / mSampleRate;
+ float pos = float(frameNum) / mSampleRate;
- mSeekPos = (int64_t)(pos * AV_TIME_BASE);
+ mSeekPos = (int64_t)(pos * float(AV_TIME_BASE));
mSeekFlags = frameNum < mFrameCounter ? AVSEEK_FLAG_BACKWARD : 0;
mSeekReq = true;
mSeekFrameNum = frameNum;
- printf("seek end\n");
}
void ffmpegReader::fillBuffer( float *buffer, int framesNum )
More information about the Bf-blender-cvs
mailing list