Skip to content

Commit

Permalink
DVDVideoCodecFFmpeg: fix flushed state after hardware check
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSwissKnife authored and FernetMenta committed Jan 9, 2012
1 parent a9a247b commit 2c2a728
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,10 @@ int CDVDVideoCodecFFmpeg::Decode(BYTE* pData, int iSize, double dts, double pts)
{
result = m_pHardware->Check(m_pCodecContext);
if (result & VC_FLUSHED)
{
Reset();
return result | VC_DROPPED; //no point in continuing if we are told of a flush
}
}
else
{
Expand Down Expand Up @@ -1036,6 +1039,7 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture* pDvdVideoPicture)
if (!m_pFrame)
return false;

//TODO: surely iRepeatPicture should be the same as m_pFrame->repeat_pict so that it reflects the number of repeats (including for progressive repeats)
pDvdVideoPicture->iRepeatPicture = 0.5 * m_pFrame->repeat_pict;
pDvdVideoPicture->iFlags = DVP_FLAG_ALLOCATED;
pDvdVideoPicture->iFlags |= m_pFrame->interlaced_frame ? DVP_FLAG_INTERLACED : 0;
Expand Down Expand Up @@ -1071,14 +1075,15 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture* pDvdVideoPicture)
else
pDvdVideoPicture->pts = DVD_NOPTS_VALUE;

// flags supplied by Decode from the hints present at time of input to decoder
pDvdVideoPicture->iFlags |= m_iFrameFlags;

if(!m_started)
pDvdVideoPicture->iFlags |= DVP_FLAG_DROPPED;

pDvdVideoPicture->iGroupId = m_iGroupId;

//CLog::Log(LOGDEBUG,"ASB: CDVDVideoCodecFFmpeg::GetPictureCommon pDvdVideoPicture->pts: %f pDvdVideoPicture->iDisplayWidth: %i pDvdVideoPicture->iDisplayHeight: %i", pDvdVideoPicture->pts, (int)pDvdVideoPicture->iDisplayWidth, (int)pDvdVideoPicture->iDisplayHeight);

return true;
}

Expand Down

0 comments on commit 2c2a728

Please sign in to comment.