Skip to content

Commit

Permalink
refactor(AppleVideoToolBox): drop the pic with wrong poc
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Feb 28, 2020
1 parent 7ce822c commit 525611c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions framework/codec/Apple/AppleVideoToolBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,14 @@ namespace Cicada {
assert(mParser != nullptr);
mParser->parser(packet->getData(), packet->getSize());
int poc = mParser->getPOC();
// assert(poc >= 0);
// AF_LOGD("poc is %d\n", poc);

if (poc == 0) {
assert(keyFrame);
} else if (poc == 1) {
if (poc < 0 || (poc == 0 && !keyFrame)) {
AF_LOGE("error poc is %d\n", poc);
push_to_recovery_queue(unique_ptr<IAFPacket>(packet));
return;
}

if (poc == 1) {
mPocDelta = 1;
}

Expand Down

0 comments on commit 525611c

Please sign in to comment.