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:
Gregory Nutt 2014-07-27 19:49:01 -06:00
parent 096e8247ad
commit d2b292a033

View File

@ -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;