summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Hurlbut <ghurlbut@mythtv.org>2011-04-08 18:47:44 (GMT)
committer Gavin Hurlbut <ghurlbut@mythtv.org>2011-04-08 18:53:40 (GMT)
commit7338bd90c4ddf15a9531164799a593eede0680a5 (patch)
treed755056273cf96de2c1282958349fd5b41a30640
parentee6f60628efaa7882ffd1687227880f7bc7c7239 (diff)
Check for null frame buffers in commflag
Fixes #9304. I ran this several times against the example bad recording, and it gets very spammy with "Unknown decoding errors", but carries on to completion every time, no crash. Please reopen a new bug if this doesn't fix the issue.
-rw-r--r--mythtv/programs/mythcommflag/ClassicCommDetector.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mythtv/programs/mythcommflag/ClassicCommDetector.cpp b/mythtv/programs/mythcommflag/ClassicCommDetector.cpp
index ec2ee4a..fbec292 100644
--- a/mythtv/programs/mythcommflag/ClassicCommDetector.cpp
+++ b/mythtv/programs/mythcommflag/ClassicCommDetector.cpp
@@ -749,7 +749,7 @@ void ClassicCommDetector::ProcessFrame(VideoFrame *frame,
int rightDarkCol = width - commDetectBorder - 1;
FrameInfoEntry fInfo;
- if (!frame || frame_number == -1 || frame->codec != FMT_YV12)
+ if (!frame || !(frame->buf) || frame_number == -1 || frame->codec != FMT_YV12)
{
VERBOSE(VB_COMMFLAG, "CommDetect: Invalid video frame or codec, "
"unable to process frame.");