Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/VideoTexture/VideoFFmpeg.cpp
| Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Lines | if (avcodec_open2(codecCtx, codec, NULL) < 0) | ||||
| return -1; | return -1; | ||||
| } | } | ||||
| #ifdef FFMPEG_OLD_FRAME_RATE | #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; | codecCtx->frame_rate_base=1000; | ||||
| m_baseFrameRate = (double)codecCtx->frame_rate / (double)codecCtx->frame_rate_base; | m_baseFrameRate = (double)codecCtx->frame_rate / (double)codecCtx->frame_rate_base; | ||||
| #else | #else | ||||
| m_baseFrameRate = av_q2d(av_get_r_frame_rate_compat(formatCtx->streams[videoStream])); | m_baseFrameRate = av_q2d(av_get_r_frame_rate_compat(formatCtx, formatCtx->streams[videoStream])); | ||||
| #endif | #endif | ||||
| if (m_baseFrameRate <= 0.0) | if (m_baseFrameRate <= 0.0) | ||||
| m_baseFrameRate = defFrameRate; | m_baseFrameRate = defFrameRate; | ||||
| m_codec = codec; | m_codec = codec; | ||||
| m_codecCtx = codecCtx; | m_codecCtx = codecCtx; | ||||
| m_formatCtx = formatCtx; | m_formatCtx = formatCtx; | ||||
| m_videoStream = videoStream; | m_videoStream = videoStream; | ||||
| ▲ Show 20 Lines • Show All 1,153 Lines • Show Last 20 Lines | |||||