Skip to content

Commit

Permalink
Check for null frame buffers in commflag
Browse files Browse the repository at this point in the history
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
Beirdo committed Apr 8, 2011
1 parent 80192ec commit 362d834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/programs/mythcommflag/ClassicCommDetector.cpp
Expand Up @@ -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.");
Expand Down

0 comments on commit 362d834

Please sign in to comment.