Permalink
Browse files

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.
  • Loading branch information...
Beirdo committed Apr 8, 2011
1 parent ee6f606 commit 7338bd90c4ddf15a9531164799a593eede0680a5
Showing with 1 addition and 1 deletion.
  1. +1 −1 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.");

0 comments on commit 7338bd9

Please sign in to comment.