Reset nal unit type after key frame determination

This commit is contained in:
Daniele Sparano 2025-02-12 14:21:16 +00:00 committed by tonihei
parent 07150b816f
commit c144420be8

View File

@ -518,9 +518,9 @@ public final class H264Reader implements ElementaryStreamReader {
sampleIsKeyframe = false; sampleIsKeyframe = false;
readingSample = true; readingSample = true;
} }
setSampleIsKeyframe();
// Reset NAL unit type to avoid stale state // Reset NAL unit type to avoid stale state
nalUnitType = NalUnitUtil.H264_NAL_UNIT_TYPE_UNSPECIFIED; nalUnitType = NalUnitUtil.H264_NAL_UNIT_TYPE_UNSPECIFIED;
setSampleIsKeyframe();
return sampleIsKeyframe; return sampleIsKeyframe;
} }