Skip to content

Commit

Permalink
refactor(avafpacket): support AV_PKT_FLAG_DISCARD flag
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Apr 21, 2020
1 parent 4d07e86 commit d6b95e8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions framework/base/media/AVAFPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ void AVAFPacket::copyInfo()
mInfo.dts = mpkt->dts;
// TODO: redefine the flags
mInfo.flags = 0;
if (mpkt->flags & AV_PKT_FLAG_KEY)
if (mpkt->flags & AV_PKT_FLAG_KEY) {
mInfo.flags |= AF_PKT_FLAG_KEY;
if (mpkt->flags & AV_PKT_FLAG_CORRUPT)
}
if (mpkt->flags & AV_PKT_FLAG_CORRUPT) {
mInfo.flags |= AF_PKT_FLAG_CORRUPT;
}
if (mpkt->flags & AV_PKT_FLAG_DISCARD) {
setDiscard(true);
}

mInfo.streamIndex = mpkt->stream_index;
mInfo.timePosition = INT64_MIN;
Expand Down

0 comments on commit d6b95e8

Please sign in to comment.