mp4parser
mp4parser copied to clipboard
H264NalConsumingTrack -- wrong sliceNalUnitHeader used for sample creation
I think in H264NalConsumingTrack.consumeNal the assignment
sliceNalUnitHeader = nalUnitHeader;
should be after the call to createSample
:
FirstVclNalDetector current = new FirstVclNalDetector(nal,
nalUnitHeader.nal_ref_idc, nalUnitHeader.nal_unit_type);
// sliceNalUnitHeader = nalUnitHeader; // <-- this causes wrong nal unit header to be used in createSample
if (fvnd != null && fvnd.isFirstInNew(current)) {
LOG.debug("Wrapping up cause of first vcl nal is found");
pushSample(createSample(buffered, fvnd.sliceHeader, sliceNalUnitHeader), false, false);
buffered.clear();
}
sliceNalUnitHeader = nalUnitHeader; // <--
fvnd = current;
@sannies is this valid? I'm attempting to use H264NalConsumingTrack
and I'm getting unplayable content, so I'm curious about this issue.