File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/AudioTools/AudioCodecs Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -428,12 +428,14 @@ class MTSDecoder : public AudioDecoder {
428428 pesData = pes;
429429 pesDataSize = len;
430430 }
431- open_pes_data_size -= pesDataSize;
432431
432+ // Recalculate the open data
433+ open_pes_data_size -= pesDataSize;
433434 if (open_pes_data_size < 0 ) {
434435 return ;
435436 }
436437
438+ // / Write the data
437439 LOGI (" - writing %d bytes (open: %d)" , pesDataSize, open_pes_data_size);
438440 if (p_print) {
439441 size_t result = writeData<uint8_t >(p_print, pesData, pesDataSize);
@@ -446,14 +448,15 @@ class MTSDecoder : public AudioDecoder {
446448 }
447449 }
448450
449- // check for PES packet start code prefix
451+ // / check for PES packet start code prefix
450452 bool isPESStartCodeValid (uint8_t *pes) {
451453 if (pes[0 ] != 0 ) return false ;
452454 if (pes[1 ] != 0 ) return false ;
453455 if (pes[2 ] != 0x1 ) return false ;
454456 return true ;
455457 }
456458
459+ // / Convert the relevant MTSStreamType to a string
457460 const char *toStr (MTSStreamType type) {
458461 switch (type) {
459462 case MTSStreamType::AUDIO_MP3:
You can’t perform that action at this time.
0 commit comments