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.
(cherry picked from commit 7338bd9)
  • Loading branch information...
1 parent 80192ec commit 362d834c8ca8d3a4554536adb54e79bbcb41e5c8 @Beirdo Beirdo committed Apr 8, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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.");

0 comments on commit 362d834

Please sign in to comment.