return LAST_BUFFER_ERROR when last buffer reached

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30549 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
David McPaul 2009-05-02 04:32:01 +00:00
parent 008c3af957
commit 4d97ad948b

View File

@ -467,8 +467,13 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
media_header chunk_mh;
status_t err;
err = GetNextChunk(&fChunkBuffer, &fChunkBufferSize, &chunk_mh);
if (err == B_LAST_BUFFER_ERROR) {
TRACE("Last Chunk with chunk size %ld\n",fChunkBufferSize);
fChunkBufferSize = 0;
return err;
}
if (err != B_OK || fChunkBufferSize < 0) {
TRACE("GetNextChunk error %ld\n",fChunkBufferSize);
printf("GetNextChunk error %ld\n",fChunkBufferSize);
fChunkBufferSize = 0;
break;
}