diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/system/nxplayer/nxplayer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/system/nxplayer/nxplayer.c b/apps/system/nxplayer/nxplayer.c index fd4401d0a..c0f9e4ff3 100644 --- a/apps/system/nxplayer/nxplayer.c +++ b/apps/system/nxplayer/nxplayer.c @@ -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; |