diff --git a/libeplayer3-arm/main/exteplayer.c b/libeplayer3-arm/main/exteplayer.c index 6ad047b..ed82df1 100644 --- a/libeplayer3-arm/main/exteplayer.c +++ b/libeplayer3-arm/main/exteplayer.c @@ -638,7 +638,7 @@ int main(int argc, char *argv[]) memset(argvBuff, '\0', sizeof(argvBuff)); int commandRetVal = -1; /* inform client that we can handle additional commands */ - fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 42); + fprintf(stderr, "{\"EPLAYER3_EXTENDED\":{\"version\":%d}}\n", 43); if (0 != ParseParams(argc, argv, file, audioFile, &audioTrackIdx, &subtitleTrackIdx, &linuxDvbBufferSizeMB)) { printf("Usage: exteplayer3 filePath [-u user-agent] [-c cookies] [-h headers] [-p prio] [-a] [-d] [-w] [-l] [-s] [-i] [-t audioTrackId] [-9 subtitleTrackId] [-x separateAudioUri] plabackUri\n"); diff --git a/libeplayer3-arm/output/writer/mipsel/aac.c b/libeplayer3-arm/output/writer/mipsel/aac.c index c1cec2d..c382f16 100644 --- a/libeplayer3-arm/output/writer/mipsel/aac.c +++ b/libeplayer3-arm/output/writer/mipsel/aac.c @@ -177,6 +177,14 @@ static int _writeData(WriterAVCallData_t *call, int type) aac_err("parsing Data with missing syncword. ignoring...\n"); return 0; } + + // STB can handle only AAC LC profile + if (0 == (call->data[2] & 0xC0)) + { + // change profile AAC Main -> AAC LC (Low Complexity) + aac_printf(1, "change profile AAC Main -> AAC LC (Low Complexity) in the ADTS header"); + call->data[2] = (call->data[2] & 0x1F) | 0x40; + } } else // check LOAS header { @@ -217,8 +225,11 @@ static int writeDataADTS(WriterAVCallData_t *call) return 0; } if ((call->private_data && 0 == strncmp("ADTS", (const char *)call->private_data, call->private_size)) || - HasADTSHeader(call->data, call->len)) + HasADTSHeader(call->data, call->len)) { + //(aacbuf[2] & 0x1F) | 0x40 + + //printf("%hhx %hhx %hhx %hhx %hhx %hhx %hhx %hhx\n", call->data[0], call->data[1], call->data[2], call->data[3], call->data[4], call->data[5], call->data[6], call->data[7]); return _writeData(call, 0); } uint32_t PacketLength = call->len + AAC_HEADER_LENGTH; diff --git a/libeplayer3-arm/output/writer/sh4/aac.c b/libeplayer3-arm/output/writer/sh4/aac.c index 6eeab11..e70336c 100644 --- a/libeplayer3-arm/output/writer/sh4/aac.c +++ b/libeplayer3-arm/output/writer/sh4/aac.c @@ -176,6 +176,14 @@ static int _writeData(void *_call, int type) aac_err("parsing Data with missing syncword. ignoring...\n"); return 0; } + + // STB can handle only AAC LC profile + if (0 == (call->data[2] & 0xC0)) + { + // change profile AAC Main -> AAC LC (Low Complexity) + aac_printf(1, "change profile AAC Main -> AAC LC (Low Complexity) in the ADTS header"); + call->data[2] = (call->data[2] & 0x1F) | 0x40; + } } else // check LOAS header {