mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
cRecord: fix compiler warning (type mismatch)
This commit is contained in:
@@ -174,7 +174,6 @@ void cRecord::RecordThread()
|
|||||||
lt_info("%s: begin\n", __func__);
|
lt_info("%s: begin\n", __func__);
|
||||||
#define BUFSIZE (1 << 20) /* 1MB */
|
#define BUFSIZE (1 << 20) /* 1MB */
|
||||||
#define READSIZE (BUFSIZE / 16)
|
#define READSIZE (BUFSIZE / 16)
|
||||||
ssize_t r = 0;
|
|
||||||
int buf_pos = 0;
|
int buf_pos = 0;
|
||||||
int queued = 0;
|
int queued = 0;
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
@@ -197,6 +196,7 @@ void cRecord::RecordThread()
|
|||||||
|
|
||||||
dmx->Start();
|
dmx->Start();
|
||||||
bool overflow = false;
|
bool overflow = false;
|
||||||
|
int r = 0;
|
||||||
while (exit_flag == RECORD_RUNNING)
|
while (exit_flag == RECORD_RUNNING)
|
||||||
{
|
{
|
||||||
if (buf_pos < BUFSIZE)
|
if (buf_pos < BUFSIZE)
|
||||||
@@ -204,10 +204,10 @@ void cRecord::RecordThread()
|
|||||||
int toread = BUFSIZE - buf_pos;
|
int toread = BUFSIZE - buf_pos;
|
||||||
if (toread > READSIZE)
|
if (toread > READSIZE)
|
||||||
toread = READSIZE;
|
toread = READSIZE;
|
||||||
r = dmx->Read(buf + buf_pos, toread, 50);
|
ssize_t s = dmx->Read(buf + buf_pos, toread, 50);
|
||||||
lt_debug("%s: buf_pos %6d r %6d / %6d\n", __func__,
|
lt_debug("%s: buf_pos %6d s %6d / %6d\n", __func__,
|
||||||
buf_pos, (int)r, BUFSIZE - buf_pos);
|
buf_pos, (int)s, BUFSIZE - buf_pos);
|
||||||
if (r < 0)
|
if (s < 0)
|
||||||
{
|
{
|
||||||
if (errno != EAGAIN && (errno != EOVERFLOW || !overflow))
|
if (errno != EAGAIN && (errno != EOVERFLOW || !overflow))
|
||||||
{
|
{
|
||||||
@@ -220,7 +220,7 @@ void cRecord::RecordThread()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
overflow = false;
|
overflow = false;
|
||||||
buf_pos += r;
|
buf_pos += s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user