diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-26 14:05:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-26 14:05:22 +0400 |
commit | e727056c2e34857dd5556e66c9858506eb63e987 (patch) | |
tree | b98135b6b86235193e3ffc83e9fb2431bc513c2c /source/gameengine/VideoTexture | |
parent | 9def1dea45170807faece0360cd957606b461183 (diff) |
patch [#31265] Warning Fixes 02/05/2012
from Jason Wilkins (jwilkins)
only applied some parts:
* const correctness
* moved a variable into a move local scope so it is also inside a #if/endif and does not end up conditionally unused
Diffstat (limited to 'source/gameengine/VideoTexture')
-rw-r--r-- | source/gameengine/VideoTexture/VideoFFmpeg.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp index 99f2431ac1e..74f1d9ee5f3 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp +++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp @@ -588,7 +588,7 @@ void VideoFFmpeg::openCam (char * file, short camIdx) AVInputFormat *inputFormat; AVFormatParameters formatParams; AVRational frameRate; - char *p, filename[28], rateStr[20]; + char filename[28], rateStr[20]; do_init_ffmpeg(); @@ -630,6 +630,8 @@ void VideoFFmpeg::openCam (char * file, short camIdx) return; if (file && strncmp(file, "/dev", 4) == 0) { + char *p; + // user does not specify a driver strncpy(filename, file, sizeof(filename)); filename[sizeof(filename)-1] = 0; |