libeplayer3: Standardize comparison order and improve code readability

Origin commit data
------------------
Commit: b7d7f97ee4
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2024-03-21 (Thu, 21 Mar 2024)

Origin message was:
------------------
small fix

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
BPanther
2024-03-24 22:23:52 +01:00
committed by Thilo Graf
parent 551e212a25
commit 73536563da
12 changed files with 65 additions and 69 deletions

View File

@@ -154,7 +154,7 @@ static int _writeData(WriterAVCallData_t *call, int type)
}
/* simple validation */
if (0 == type) // check ADTS header
if (type == 0) // check ADTS header
{
if (0xFF != call->data[0] || 0xF0 != (0xF0 & call->data[1]))
{
@@ -163,7 +163,7 @@ static int _writeData(WriterAVCallData_t *call, int type)
}
// STB can handle only AAC LC profile
if (0 == (call->data[2] & 0xC0))
if ((call->data[2] & 0xC0) == 0)
{
// change profile AAC Main -> AAC LC (Low Complexity)
aac_printf(1, "change profile AAC Main -> AAC LC (Low Complexity) in the ADTS header");
@@ -204,7 +204,7 @@ static int writeDataADTS(WriterAVCallData_t *call)
return 0;
}
if ((call->private_data && 0 == strncmp("ADTS", (const char *)call->private_data, call->private_size)) ||
if ((call->private_data && strncmp("ADTS", (const char *)call->private_data, call->private_size) == 0) ||
HasADTSHeader(call->data, call->len))
{
//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]);
@@ -269,7 +269,7 @@ static int writeDataLATM(WriterAVCallData_t *call)
return 0;
}
if (call->private_data && 0 == strncmp("LATM", (const char *)call->private_data, call->private_size))
if (call->private_data && strncmp("LATM", (const char *)call->private_data, call->private_size) == 0)
{
return _writeData(call, 1);
}