Skip to content

Commit

Permalink
Revert "mmalcodec: Treat corrupt frames as dropped"
Browse files Browse the repository at this point in the history
This reverts commit ba11e5735ae379bb4d121410acedc91b87c8ceec.
  • Loading branch information
popcornmix committed Oct 15, 2018
1 parent 09b3323 commit 14fac35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp
Expand Up @@ -220,6 +220,8 @@ void CMMALVideo::dec_output_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf
// we don't keep up when running at 60fps in the background so switch to half rate
if (m_fps > 40.0f && !CServiceBroker::GetWinSystem()->GetGfxContext().IsFullScreenVideo() && !(m_num_decoded & 1))
wanted = false;
if (CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_omxDecodeStartWithValidFrame && (buffer->flags & MMAL_BUFFER_HEADER_FLAG_CORRUPTED))
wanted = false;
m_num_decoded++;
CLog::Log(LOGDEBUG, LOGVIDEO,
"%s::%s - omvb:%p mmal:%p len:%u dts:%.3f pts:%.3f flags:%x:%x pool:%p %dx%d "
Expand Down Expand Up @@ -836,7 +838,7 @@ CDVDVideoCodec::VCReturn CMMALVideo::GetPicture(VideoPicture* picture)
picture->pts = buffer->mmal_buffer->pts == MMAL_TIME_UNKNOWN ? DVD_NOPTS_VALUE : buffer->mmal_buffer->pts;
picture->iRepeatPicture = 0;
picture->iFlags = 0;
if (buffer->mmal_buffer->flags & MMAL_BUFFER_HEADER_FLAG_USER3 || (CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_omxDecodeStartWithValidFrame && (buffer->flags & MMAL_BUFFER_HEADER_FLAG_CORRUPTED)))
if (buffer->mmal_buffer->flags & MMAL_BUFFER_HEADER_FLAG_USER3)
picture->iFlags |= DVP_FLAG_DROPPED;
CLog::Log(LOGINFO, LOGVIDEO,
"%s::%s dts:%.3f pts:%.3f flags:%x:%x MMALBuffer:%p mmal_buffer:%p", CLASSNAME,
Expand Down

0 comments on commit 14fac35

Please sign in to comment.