NxPlayer needs to set curbyte field to zero before enqueuing a buffer. Otherwise, it looks like beginning of the buffer has already been consumed
This commit is contained in:
parent
096e8247ad
commit
d2b292a033
@ -496,7 +496,9 @@ static int nxplayer_enqueuebuffer(FAR struct nxplayer_s *pPlayer,
|
||||
|
||||
/* Read data into the buffer. */
|
||||
|
||||
pBuf->nbytes = fread(&pBuf->samp, 1, pBuf->nmaxbytes, pPlayer->fileFd);
|
||||
pBuf->nbytes = fread(&pBuf->samp, 1, pBuf->nmaxbytes, pPlayer->fileFd);
|
||||
pBuf->curbyte = 0;
|
||||
|
||||
if (pBuf->nbytes < pBuf->nmaxbytes)
|
||||
{
|
||||
int errcode = errno;
|
||||
|
Loading…
Reference in New Issue
Block a user