Remove gitattributes and some formatting changes

This commit is contained in:
tonihei 2025-02-21 11:57:20 +00:00
parent da360a67cb
commit 6121445718
7 changed files with 6 additions and 9 deletions

View File

@ -140,7 +140,6 @@ public final class H264Reader implements ElementaryStreamReader {
// Scan the appended data, processing NAL units as they are encountered
while (true) {
int prefixSize = 3;
int nalUnitOffset = NalUnitUtil.findNalUnit(dataArray, offset, limit, prefixFlags);
if (nalUnitOffset == limit) {
@ -154,6 +153,7 @@ public final class H264Reader implements ElementaryStreamReader {
// Case of a 4 byte start code prefix 0x00000001, recoil NAL unit offset by one byte
// to avoid previous byte being assigned to the previous access unit.
int prefixSize = 3;
if (nalUnitOffset > 0 && dataArray[nalUnitOffset - 1] == 0x00) {
nalUnitOffset--;
prefixSize = 4;

View File

@ -128,7 +128,6 @@ public final class H265Reader implements ElementaryStreamReader {
// Scan the appended data, processing NAL units as they are encountered
while (offset < limit) {
int prefixSize = 3;
int nalUnitOffset = NalUnitUtil.findNalUnit(dataArray, offset, limit, prefixFlags);
if (nalUnitOffset == limit) {
@ -142,6 +141,7 @@ public final class H265Reader implements ElementaryStreamReader {
// Case of a 4 byte start code prefix 0x00000001, recoil NAL unit offset by one byte
// to avoid previous byte being assigned to the previous access unit.
int prefixSize = 3;
if (nalUnitOffset > 0 && dataArray[nalUnitOffset - 1] == 0x00) {
nalUnitOffset--;
prefixSize = 4;
@ -177,7 +177,8 @@ public final class H265Reader implements ElementaryStreamReader {
assertTracksCreated();
if (isEndOfInput) {
seiReader.flush();
// Simulate end of current NAL unit and start an unspecified one to trigger output of current sample
// Simulate end of current NAL unit and start an unspecified one to trigger output of current
// sample
endNalUnit(totalBytesWritten, 0, 0, pesTimeUs);
startNalUnit(totalBytesWritten, 0, NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED, pesTimeUs);
}

View File

@ -172,8 +172,8 @@ public final class PesReader implements TsPayloadReader {
// is due to H262 streams possibly having, in HLS mode, a pes across more than one segment
// which would trigger committing an unfinished sample in the middle of the access unit
// Only call parseHeader ifIsModeHls is true and can parse header
// some hls may contain broken packages
// Only call parseHeader if isModeHls is true and can parse header as some HLS streams may
// contain packages.
boolean headerParsed = !isModeHls || parseHeader();
return state == STATE_READING_BODY
&& payloadSize == C.LENGTH_UNSET

View File

@ -1 +0,0 @@
*.dump -text

View File

@ -1 +0,0 @@
* -text

View File

@ -1 +0,0 @@
* -text