Skip to content

Commit

Permalink
[mmalcodec] Populate the framerate of video decoder
Browse files Browse the repository at this point in the history
When timestamps are unknown, they may be interpolated based on the framerate. Without setting this,
a default of 30fps is used which may be incorrect and cause stutters
  • Loading branch information
popcornmix committed Jul 21, 2015
1 parent 840f196 commit b7c1cff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,11 @@ bool CMMALVideo::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
m_dec_input->format->es->video.width = ALIGN_UP(m_hints.width, 32);
m_dec_input->format->es->video.height = ALIGN_UP(m_hints.height, 16);
}
if (hints.fpsrate > 0 && hints.fpsscale > 0)
{
m_dec_input->format->es->video.frame_rate.num = hints.fpsrate;
m_dec_input->format->es->video.frame_rate.den = hints.fpsscale;
}
m_dec_input->format->flags |= MMAL_ES_FORMAT_FLAG_FRAMED;

error_concealment.hdr.id = MMAL_PARAMETER_VIDEO_DECODE_ERROR_CONCEALMENT;
Expand Down

0 comments on commit b7c1cff

Please sign in to comment.