mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-30 17:01:16 +02:00
libeplayer3: run through indent, no binary change
This commit is contained in:
@@ -94,72 +94,71 @@ static int reset()
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int writeData(void* _call)
|
||||
static int writeData(void *_call)
|
||||
{
|
||||
WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
|
||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||
|
||||
int len = 0;
|
||||
|
||||
wma_printf(10, "\n");
|
||||
|
||||
if (call == NULL)
|
||||
{
|
||||
wma_err("call data is NULL...\n");
|
||||
return 0;
|
||||
if (call == NULL) {
|
||||
wma_err("call data is NULL...\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
wma_printf(10, "AudioPts %lld\n", call->Pts);
|
||||
|
||||
if ((call->data == NULL) || (call->len <= 0))
|
||||
{
|
||||
wma_err("parsing NULL Data. ignoring...\n");
|
||||
return 0;
|
||||
if ((call->data == NULL) || (call->len <= 0)) {
|
||||
wma_err("parsing NULL Data. ignoring...\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (call->fd < 0)
|
||||
{
|
||||
wma_err("file pointer < 0. ignoring ...\n");
|
||||
return 0;
|
||||
if (call->fd < 0) {
|
||||
wma_err("file pointer < 0. ignoring ...\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (initialHeader) {
|
||||
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
|
||||
if ((call->private_size <= 0) || (call->private_data == NULL))
|
||||
{
|
||||
wma_err("private NULL.\n");
|
||||
return -1;
|
||||
}
|
||||
if ((call->private_size <= 0) || (call->private_data == NULL)) {
|
||||
wma_err("private NULL.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
struct iovec iov[2];
|
||||
iov[0].iov_base = PesHeader;
|
||||
iov[0].iov_len = InsertPesHeader (PesHeader, call->private_size, MPEG_AUDIO_PES_START_CODE, 0, 0);
|
||||
iov[0].iov_len =
|
||||
InsertPesHeader(PesHeader, call->private_size,
|
||||
MPEG_AUDIO_PES_START_CODE, 0, 0);
|
||||
iov[1].iov_base = call->private_data;
|
||||
iov[1].iov_len = call->private_size;
|
||||
|
||||
len = writev(call->fd, iov, 2);
|
||||
len = writev(call->fd, iov, 2);
|
||||
|
||||
initialHeader = 0;
|
||||
initialHeader = 0;
|
||||
}
|
||||
|
||||
if (len > -1 && call->len > 0 && call->data)
|
||||
{
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
if (len > -1 && call->len > 0 && call->data) {
|
||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||
|
||||
|
||||
struct iovec iov[2];
|
||||
iov[0].iov_base = PesHeader;
|
||||
iov[0].iov_len = InsertPesHeader (PesHeader, call->len, MPEG_AUDIO_PES_START_CODE, call->Pts, 0);
|
||||
iov[0].iov_len =
|
||||
InsertPesHeader(PesHeader, call->len,
|
||||
MPEG_AUDIO_PES_START_CODE, call->Pts, 0);
|
||||
iov[1].iov_base = call->data;
|
||||
iov[1].iov_len = call->len;
|
||||
|
||||
ssize_t l = writev(call->fd, iov, 2);
|
||||
ssize_t l = writev(call->fd, iov, 2);
|
||||
if (l > -1)
|
||||
len += l;
|
||||
len += l;
|
||||
else
|
||||
len = l;
|
||||
len = l;
|
||||
}
|
||||
|
||||
wma_printf(10, "wma < %d\n", len);
|
||||
|
Reference in New Issue
Block a user