Skip to content

Commit

Permalink
DVDVideoCodecDRMPRIME: Discard corrupt frames
Browse files Browse the repository at this point in the history
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
  • Loading branch information
popcornmix committed Jan 15, 2021
1 parent 2c95d2b commit 959f279
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)

pVideoPicture->iRepeatPicture = 0;
pVideoPicture->iFlags = 0;
pVideoPicture->iFlags |= !(m_pFrame->flags & AV_FRAME_FLAG_CORRUPT) ? 0 : DVP_FLAG_DROPPED;
pVideoPicture->iFlags |= m_pFrame->interlaced_frame ? DVP_FLAG_INTERLACED : 0;
pVideoPicture->iFlags |= m_pFrame->top_field_first ? DVP_FLAG_TOP_FIELD_FIRST : 0;

Expand Down

0 comments on commit 959f279

Please sign in to comment.