Supplement to "libeplayer3: Standardize comparison order and improve code readability"

Origin commit data
------------------
Commit: 0737aa3ba6
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-03-25 (Mon, 25 Mar 2024)

Origin message was:
------------------
- addition to "small fix"

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2024-03-25 06:37:01 +01:00
committed by Thilo Graf
parent 73536563da
commit 900c92a67e
7 changed files with 16 additions and 16 deletions

View File

@@ -283,11 +283,11 @@ int32_t LinuxDvbBuffOpen(Context_t *context, char *type, int outfd, void *mtx)
if (!ret)
{
if (!strcmp("video", type) && -1 == videofd)
if (!strcmp("video", type) && videofd == -1)
{
videofd = outfd;
}
else if (!strcmp("audio", type) && -1 == audiofd)
else if (!strcmp("audio", type) && audiofd == -1)
{
audiofd = outfd;
}

View File

@@ -53,7 +53,7 @@
void FlushPipe(int pipefd)
{
char tmp;
while (1 == read(pipefd, &tmp, 1));
while (read(pipefd, &tmp, 1) == 1);
}
ssize_t WriteExt(WriteV_t _call, int fd, void *data, size_t size)

View File

@@ -276,7 +276,7 @@ static int32_t writeData(void *_call)
iov[2].iov_len = SubFrameLen;
//write the PCM data
if (16 == pcmPrivateData->bits_per_coded_sample)
if (pcmPrivateData->bits_per_coded_sample == 16)
{
for (n = 0; n < SubFrameLen; n += 2)
{

View File

@@ -99,7 +99,7 @@ int InsertPesHeader(unsigned char *data, int size, unsigned char stream_id, unsi
PutBits(&ld2, 0x1, 8); // Start Code
PutBits(&ld2, stream_id, 8); // Stream_id = Audio Stream
//4
if (-1 == size)
if (size == -1)
{
PutBits(&ld2, 0x0, 16);
}