Skip to content

Commit

Permalink
fix(frameCb): cache depends on this callback. need find another way
Browse files Browse the repository at this point in the history
  • Loading branch information
I-m-SuperMan authored and kongjianneu committed Jul 13, 2020
1 parent b272686 commit 09637b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mediaPlayer/SuperMediaPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2622,15 +2622,17 @@ namespace Cicada {
}
}

if (mMediaFrameCb && !pMedia_Frame->isProtected()) {
//TODO : cache depends on this callback. need find another way
if (mMediaFrameCb /*&& !pMedia_Frame->isProtected()*/) {
// TODO: change to std::unique_ptr<IAFPacket>
mMediaFrameCb(mMediaFrameCbArg, pMedia_Frame, ST_TYPE_AUDIO);
}

mBufferController.AddPacket(move(pMedia_Frame), BUFFER_TYPE_AUDIO);
} else if (pFrame->getInfo().streamIndex == mCurrentSubtitleIndex ||
pFrame->getInfo().streamIndex == mWillChangedSubtitleStreamIndex) {
if (mMediaFrameCb && !pMedia_Frame->isProtected()) {
//TODO : cache depends on this callback. need find another way
if (mMediaFrameCb /*&& !pMedia_Frame->isProtected()*/) {
// TODO: change to std::unique_ptr<IAFPacket>
mMediaFrameCb(mMediaFrameCbArg, pMedia_Frame, ST_TYPE_SUB);
}
Expand Down

0 comments on commit 09637b0

Please sign in to comment.