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:54:45 (GMT)
commit362d834c8ca8d3a4554536adb54e79bbcb41e5c8 (patch)
tree111de1837168c9518185f65fa70e15f5bd96cf62
parent80192ec90d0c8937c642f41a11c5316830472545 (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. (cherry picked from commit 7338bd90c4ddf15a9531164799a593eede0680a5)
-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 954720d..74097c7 100644
--- a/mythtv/programs/mythcommflag/ClassicCommDetector.cpp
+++ b/mythtv/programs/mythcommflag/ClassicCommDetector.cpp
@@ -740,7 +740,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.");