Skip to content

Commit 959f279

Browse files
committed
DVDVideoCodecDRMPRIME: Discard corrupt frames
ffmpeg/V4L2 decoder can set AV_FRAME_FLAG_CORRUPT if the frame failed to decode.# Pass that onto VideoPlayer so the frame can skip renderer
1 parent 2c95d2b commit 959f279

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
528528

529529
pVideoPicture->iRepeatPicture = 0;
530530
pVideoPicture->iFlags = 0;
531+
pVideoPicture->iFlags |= !(m_pFrame->flags & AV_FRAME_FLAG_CORRUPT) ? 0 : DVP_FLAG_DROPPED;
531532
pVideoPicture->iFlags |= m_pFrame->interlaced_frame ? DVP_FLAG_INTERLACED : 0;
532533
pVideoPicture->iFlags |= m_pFrame->top_field_first ? DVP_FLAG_TOP_FIELD_FIRST : 0;
533534

0 commit comments

Comments
 (0)