Skip to content

Commit

Permalink
MMALFFPEG: Avoid crash with 10-bit video
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Mar 1, 2016
1 parent 1c7b53c commit 6dcbf2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.cpp
Expand Up @@ -372,6 +372,9 @@ bool CDecoder::GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture
if (!ret)
return false;

if (frame->format != AV_PIX_FMT_YUV420P || frame->buf[1] != nullptr || frame->buf[0] == nullptr)
return false;

MMAL_BUFFER_HEADER_T *mmal_buffer = GetMmal();
if (!mmal_buffer)
return false;
Expand Down

0 comments on commit 6dcbf2a

Please sign in to comment.