mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-31 14:13:09 +00:00
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
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue