Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/VideoTexture/VideoFFmpeg.cpp')
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
index 9db85a0029a..427be39ef22 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
@@ -169,10 +169,10 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
AVCodec *codec;
AVCodecContext *codecCtx;
- if(av_open_input_file(&formatCtx, filename, inputFormat, 0, formatParams)!=0)
+ if (av_open_input_file(&formatCtx, filename, inputFormat, 0, formatParams)!=0)
return -1;
- if(av_find_stream_info(formatCtx)<0)
+ if (av_find_stream_info(formatCtx)<0)
{
av_close_input_file(formatCtx);
return -1;
@@ -180,9 +180,9 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
/* Find the first video stream */
videoStream=-1;
- for(i=0; i<formatCtx->nb_streams; i++)
+ for (i=0; i<formatCtx->nb_streams; i++)
{
- if(formatCtx->streams[i] &&
+ if (formatCtx->streams[i] &&
get_codec_from_stream(formatCtx->streams[i]) &&
(get_codec_from_stream(formatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO))
{
@@ -191,7 +191,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
}
}
- if(videoStream==-1)
+ if (videoStream==-1)
{
av_close_input_file(formatCtx);
return -1;
@@ -201,20 +201,20 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
/* Find the decoder for the video stream */
codec=avcodec_find_decoder(codecCtx->codec_id);
- if(codec==NULL)
+ if (codec==NULL)
{
av_close_input_file(formatCtx);
return -1;
}
codecCtx->workaround_bugs = 1;
- if(avcodec_open(codecCtx, codec)<0)
+ if (avcodec_open(codecCtx, codec)<0)
{
av_close_input_file(formatCtx);
return -1;
}
#ifdef FFMPEG_OLD_FRAME_RATE
- if(codecCtx->frame_rate>1000 && codecCtx->frame_rate_base==1)
+ if (codecCtx->frame_rate>1000 && codecCtx->frame_rate_base==1)
codecCtx->frame_rate_base=1000;
m_baseFrameRate = (double)codecCtx->frame_rate / (double)codecCtx->frame_rate_base;
#else
@@ -373,7 +373,7 @@ void *VideoFFmpeg::cacheThread(void *data)
avcodec_decode_video2(video->m_codecCtx,
video->m_frame, &frameFinished,
&cachePacket->packet);
- if(frameFinished)
+ if (frameFinished)
{
AVFrame * input = video->m_frame;
@@ -793,7 +793,7 @@ void VideoFFmpeg::calcImage (unsigned int texId, double ts)
{
AVFrame* frame;
// get image
- if((frame = grabFrame(actFrame)) != NULL)
+ if ((frame = grabFrame(actFrame)) != NULL)
{
if (!m_isFile && !m_cacheStarted)
{
@@ -999,7 +999,7 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
// return the next frame. This is not quite correct, may need more work
while(av_read_frame(m_formatCtx, &packet)>=0)
{
- if(packet.stream_index == m_videoStream)
+ if (packet.stream_index == m_videoStream)
{
avcodec_decode_video2(m_codecCtx,
m_frame, &frameFinished,