Skip to content

Commit

Permalink
MMALCodec: Reset picture before populating
Browse files Browse the repository at this point in the history
Without this we don't reset stereoMode string which leaves it with a stale value
  • Loading branch information
popcornmix committed Apr 3, 2020
1 parent 285529e commit 70fc598
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,11 +810,9 @@ CDVDVideoCodec::VCReturn CMMALVideo::GetPicture(VideoPicture* picture)
if (ret == CDVDVideoCodec::VC_PICTURE)
{
assert(buffer && buffer->mmal_buffer);
if (picture->videoBuffer)
picture->videoBuffer->Release();
picture->Reset();
picture->videoBuffer = dynamic_cast<CVideoBuffer*>(buffer);
assert(picture->videoBuffer);
picture->color_range = 0;
picture->iWidth = buffer->Width() ? buffer->Width() : m_decoded_width;
picture->iHeight = buffer->Height() ? buffer->Height() : m_decoded_height;
picture->iDisplayWidth = picture->iWidth;
Expand All @@ -834,8 +832,6 @@ CDVDVideoCodec::VCReturn CMMALVideo::GetPicture(VideoPicture* picture)
// timestamp is in microseconds
picture->dts = buffer->mmal_buffer->dts == MMAL_TIME_UNKNOWN ? DVD_NOPTS_VALUE : buffer->mmal_buffer->dts;
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)
picture->iFlags |= DVP_FLAG_DROPPED;
CLog::Log(LOGINFO, LOGVIDEO,
Expand Down

0 comments on commit 70fc598

Please sign in to comment.