Skip to content

Commit

Permalink
Treat BLA (Broken Link Access) pictures as key frames (issue #1)
Browse files Browse the repository at this point in the history
This affects the state of sample flags (sample_depends_on,
sample_is_depended_on, and sample_is_difference_sample) in "trun" atoms.
  • Loading branch information
xtne6f committed Mar 9, 2024
1 parent d600cb4 commit cd49838
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mp4fragmenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ void CMp4Fragmenter::AddVideoPes(const std::vector<uint8_t> &pes, bool h265)
// Drop SEI
}
else {
if (h265 ? (nalUnitType == 19 || nalUnitType == 20 || nalUnitType == 21) : (nalUnitType == 5)) {
// IRAP
if (h265 ? (nalUnitType >= 16 || nalUnitType <= 21) : (nalUnitType == 5)) {
// IRAP (BLA or CRA or IDR)
isKey = true;
}
sampleSize += 4 + len;
Expand Down

0 comments on commit cd49838

Please sign in to comment.