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 {
428
428
pesData = pes;
429
429
pesDataSize = len;
430
430
}
431
- open_pes_data_size -= pesDataSize;
432
431
432
+ // Recalculate the open data
433
+ open_pes_data_size -= pesDataSize;
433
434
if (open_pes_data_size < 0 ) {
434
435
return ;
435
436
}
436
437
438
+ // / Write the data
437
439
LOGI (" - writing %d bytes (open: %d)" , pesDataSize, open_pes_data_size);
438
440
if (p_print) {
439
441
size_t result = writeData<uint8_t >(p_print, pesData, pesDataSize);
@@ -446,14 +448,15 @@ class MTSDecoder : public AudioDecoder {
446
448
}
447
449
}
448
450
449
- // check for PES packet start code prefix
451
+ // / check for PES packet start code prefix
450
452
bool isPESStartCodeValid (uint8_t *pes) {
451
453
if (pes[0 ] != 0 ) return false ;
452
454
if (pes[1 ] != 0 ) return false ;
453
455
if (pes[2 ] != 0x1 ) return false ;
454
456
return true ;
455
457
}
456
458
459
+ // / Convert the relevant MTSStreamType to a string
457
460
const char *toStr (MTSStreamType type) {
458
461
switch (type) {
459
462
case MTSStreamType::AUDIO_MP3:
You can’t perform that action at this time.
0 commit comments