Ticket #9304: 0001-Detect-null-frames.patch

File 0001-Detect-null-frames.patch, 879 bytes (added by beirdo, 10 years ago)
  • mythtv/programs/mythcommflag/ClassicCommDetector.cpp

    From 1d7c8c3ebbf6ac6972ff8e917bfb67932b21b2e0 Mon Sep 17 00:00:00 2001
    From: Gavin Hurlbut <ghurlbut@mythtv.org>
    Date: Mon, 29 Nov 2010 11:25:49 -0800
    Subject: [PATCH] Detect null frames
    
    
    diff --git a/mythtv/programs/mythcommflag/ClassicCommDetector.cpp b/mythtv/programs/mythcommflag/ClassicCommDetector.cpp
    index 067e352..31d2030 100644
    a b void ClassicCommDetector::ProcessFrame(VideoFrame *frame, 
    765765    curFrameNumber = frame_number;
    766766    framePtr = frame->buf;
    767767
     768    if (!framePtr)
     769    {
     770        VERBOSE(VB_COMMFLAG, "CommDetect: Null buffer, "
     771                             "unable to process frame.");
     772        return;
     773    }
     774
    768775    fInfo.minBrightness = -1;
    769776    fInfo.maxBrightness = -1;
    770777    fInfo.avgBrightness = -1;