Community
cancel
Showing results for 
Search instead for 
Did you mean: 
anonymous210
Novice
35 Views

IndexSplitter::EnableTrack is buggy (AVI and MP4 splitting)

Hi,

IPP v6 and V7

IndexSplitter::EnableTrack(trackNum, TRUE); always FAILS


Status IndexSplitter::EnableTrack(Ipp32u nTrack, Ipp32s iState)
{
Status umcRes;

if ((nTrack < 0) || (nTrack > m_pInfo->m_nOfTracks))
return UMC_ERR_FAILED;

if (!(m_pInfo->m_ppTrackInfo[nTrack]->m_Type & TRACK_ANY_VIDEO) &&
!(m_pInfo->m_ppTrackInfo[nTrack]->m_Type & TRACK_ANY_AUDIO))
return UMC_ERR_FAILED;

if (iState == m_pInfo->m_ppTrackInfo[nTrack]->m_isSelected)
return UMC_OK;

if (!iState) { // disable track
if (vm_thread_is_valid(&m_pReadESThread[nTrack])) {
vm_thread_close(&m_pReadESThread[nTrack]);
vm_thread_set_invalid(&m_pReadESThread[nTrack]);
}
if (m_ppMediaBuffer[nTrack]) {
umcRes = m_ppMediaBuffer[nTrack]->Reset();
UMC_CHECK_STATUS(umcRes)
}
if (m_ppLockedFrame[nTrack]) {
umcRes = m_ppLockedFrame[nTrack]->Reset();
UMC_CHECK_STATUS(umcRes)
m_pIsLocked[nTrack] = 0;
}
} else { // enable track

if ((m_pInfo->m_ppTrackInfo[nTrack]->m_Type & TRACK_ANY_AUDIO) &&
(m_pInfo->m_dRate != 1.0))
return UMC_OK;

int res = 0;
IndexEntry entry;
Ipp64f curPos;

umcRes = GetTimePosition(curPos);
UMC_CHECK_STATUS(umcRes)

m_pTrackIndex[nTrack].First(entry);
// add origin time stamp
curPos += entry.GetTimeStamp();
m_pTrackIndex[nTrack].Get(entry, curPos);
if (m_pInfo->m_ppTrackInfo[nTrack]->m_Type & TRACK_ANY_VIDEO) {
if (I_PICTURE != entry.uiFlags)
m_pTrackIndex[nTrack].PrevKey(entry);
}

ReadESThreadParam* m_pESParam = new ReadESThreadParam;
m_pESParam->uiPin = nTrack;
m_pESParam->pThis = this;

umcRes = vm_thread_create(&m_pReadESThread[nTrack], (vm_thread_callback)ReadESThreadCallback, (void *)m_pESParam);
if (res != 1) {
return UMC_ERR_FAILED;
}
}


See the bold code.
It should be:


res = vm_thread_create(&m_pReadESThread[nTrack], (vm_thread_callback)ReadESThreadCallback, (void *)m_pESParam);
if (res != 1) {
return UMC_ERR_FAILED;
}



Thanks
Anonymous2
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
35 Views

Thanks for catching this issue. It will be fixed in the next product update.

Regards,
Vladimir
Chao_Y_Intel
Employee
35 Views


Hi,

The fix has been included into the 7.0.2 release. Thanks for your report.

Regards,
Chao
Reply