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:
authorMitchell Stokes <mogurijin@gmail.com>2011-07-29 10:32:30 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-07-29 10:32:30 +0400
commitb46d8955509e805f06b76a6fd800ecb4edee113b (patch)
tree7ed0b1a3b5d04ab48d3e9062ff02ce54961ecb06 /source/gameengine/VideoTexture/VideoFFmpeg.cpp
parent6960127d2609620d52620539388ada5cb466bab2 (diff)
parent26589497529ca3c8da85391d4976d286a371e258 (diff)
Merging r36529-38806bge_components
Diffstat (limited to 'source/gameengine/VideoTexture/VideoFFmpeg.cpp')
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
index 63dbc5bb7ba..f8274756c8b 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp
@@ -182,7 +182,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV
{
if(formatCtx->streams[i] &&
get_codec_from_stream(formatCtx->streams[i]) &&
- (get_codec_from_stream(formatCtx->streams[i])->codec_type==CODEC_TYPE_VIDEO))
+ (get_codec_from_stream(formatCtx->streams[i])->codec_type==AVMEDIA_TYPE_VIDEO))
{
videoStream=i;
break;
@@ -368,9 +368,9 @@ void *VideoFFmpeg::cacheThread(void *data)
BLI_remlink(&video->m_packetCacheBase, cachePacket);
// use m_frame because when caching, it is not used in main thread
// we can't use currentFrame directly because we need to convert to RGB first
- avcodec_decode_video(video->m_codecCtx,
+ avcodec_decode_video2(video->m_codecCtx,
video->m_frame, &frameFinished,
- cachePacket->packet.data, cachePacket->packet.size);
+ &cachePacket->packet);
if(frameFinished)
{
AVFrame * input = video->m_frame;
@@ -641,7 +641,7 @@ void VideoFFmpeg::openCam (char * file, short camIdx)
if (m_captRate <= 0.f)
m_captRate = defFrameRate;
sprintf(rateStr, "%f", m_captRate);
- av_parse_video_frame_rate(&frameRate, rateStr);
+ av_parse_video_rate(&frameRate, rateStr);
// populate format parameters
// need to specify the time base = inverse of rate
formatParams.time_base.num = frameRate.den;
@@ -924,10 +924,10 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
{
if (packet.stream_index == m_videoStream)
{
- avcodec_decode_video(
+ avcodec_decode_video2(
m_codecCtx,
m_frame, &frameFinished,
- packet.data, packet.size);
+ &packet);
if (frameFinished)
{
m_curPosition = (long)((packet.dts-startTs) * (m_baseFrameRate*timeBase) + 0.5);
@@ -999,9 +999,9 @@ AVFrame *VideoFFmpeg::grabFrame(long position)
{
if(packet.stream_index == m_videoStream)
{
- avcodec_decode_video(m_codecCtx,
+ avcodec_decode_video2(m_codecCtx,
m_frame, &frameFinished,
- packet.data, packet.size);
+ &packet);
// remember dts to compute exact frame number
dts = packet.dts;
if (frameFinished && !posFound)