Browse files

[PATCH] Patch to bypass code when no pixels checked

There is a feasible (although I believe very unlikely)
code path where no pixels will be checked, resulting
in a number of variables not being appropriately
set.  This code will bypass the codes if no pixels
were checked.

Fixes coverity 746805 (possible division by zero)

Fixes #11587.

Signed-off-by: Chris Pinkham <>

I have looked at the code and can see no negative effects if we
skip the blank frame section and letter/pillar-box detection code
in the unlikely event that we didn't check any pixels.  If we did
not check any pixels, there are numerous variables within this
section of code which are meaningless preventing valid detection.
  • Loading branch information...
garybuhrmaster authored and cpinkham committed Jun 10, 2013
1 parent e63d70b commit c753154cebb04f29d974d6aa6a8f228275086211
Showing with 1 addition and 1 deletion.
  1. +1 −1 mythtv/programs/mythcommflag/ClassicCommDetector.cpp
@@ -862,7 +862,7 @@ void ClassicCommDetector::ProcessFrame(VideoFrame *frame,
if (commDetectMethod & COMM_DETECT_BLANKS)
if ((commDetectMethod & COMM_DETECT_BLANKS) && blankPixelsChecked)
for(int y = commDetectBorder; y < (height - commDetectBorder);
y += vertSpacing)

0 comments on commit c753154

Please sign in to comment.