Passing the array reference to memset will not get the right number of bytes to
From: Erik Hovland <erik@hovland.org>
set.
---
programs/mythcommflag/ClassicCommDetector.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/programs/mythcommflag/ClassicCommDetector.cpp b/programs/mythcommflag/ClassicCommDetector.cpp
index 2656bda..83ba771 100644
a
|
b
|
void ClassicCommDetector::ProcessFrame(VideoFrame *frame, |
670 | 670 | |
671 | 671 | if (commDetectMethod & COMM_DETECT_BLANKS) |
672 | 672 | { |
673 | | memset(&rowMax, 0, sizeof(rowMax)); |
674 | | memset(&colMax, 0, sizeof(colMax)); |
| 673 | memset(rowMax, 0, sizeof(unsigned char) * height); |
| 674 | memset(colMax, 0, sizeof(unsigned char) * width); |
675 | 675 | |
676 | 676 | frameIsBlank = false; |
677 | 677 | } |
… |
… |
void ClassicCommDetector::BuildSceneChangeCommList(void) |
1871 | 1871 | |
1872 | 1872 | sceneCommBreakMap.clear(); |
1873 | 1873 | |
1874 | | memset(sc_histogram, 0, sizeof(sc_histogram)); |
| 1874 | memset(sc_histogram, 0, sizeof(int) * (seconds+1)); |
1875 | 1875 | for(long long f = 1; f <= framesProcessed; f++) |
1876 | 1876 | { |
1877 | 1877 | if (sceneMap.contains(f)) |