correctly initialize fStreamInfo[i].hasCookie
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39545 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
866bb10f42
commit
cae9b9d83a
@ -82,7 +82,7 @@ MediaExtractor::MediaExtractor(BDataIO* source, int32 flags)
|
|||||||
for (int32 i = 0; i < fStreamCount; i++) {
|
for (int32 i = 0; i < fStreamCount; i++) {
|
||||||
fStreamInfo[i].status = B_OK;
|
fStreamInfo[i].status = B_OK;
|
||||||
fStreamInfo[i].cookie = 0;
|
fStreamInfo[i].cookie = 0;
|
||||||
fStreamInfo[i].hasCookie = true;
|
fStreamInfo[i].hasCookie = false;
|
||||||
fStreamInfo[i].infoBuffer = 0;
|
fStreamInfo[i].infoBuffer = 0;
|
||||||
fStreamInfo[i].infoBufferSize = 0;
|
fStreamInfo[i].infoBufferSize = 0;
|
||||||
fStreamInfo[i].chunkCache
|
fStreamInfo[i].chunkCache
|
||||||
@ -99,13 +99,14 @@ MediaExtractor::MediaExtractor(BDataIO* source, int32 flags)
|
|||||||
|
|
||||||
// create all stream cookies
|
// create all stream cookies
|
||||||
for (int32 i = 0; i < fStreamCount; i++) {
|
for (int32 i = 0; i < fStreamCount; i++) {
|
||||||
if (B_OK != fReader->AllocateCookie(i, &fStreamInfo[i].cookie)) {
|
if (fReader->AllocateCookie(i, &fStreamInfo[i].cookie) != B_OK) {
|
||||||
fStreamInfo[i].cookie = 0;
|
fStreamInfo[i].cookie = 0;
|
||||||
fStreamInfo[i].hasCookie = false;
|
fStreamInfo[i].hasCookie = false;
|
||||||
fStreamInfo[i].status = B_ERROR;
|
fStreamInfo[i].status = B_ERROR;
|
||||||
ERROR("MediaExtractor::MediaExtractor: AllocateCookie for stream "
|
ERROR("MediaExtractor::MediaExtractor: AllocateCookie for stream "
|
||||||
"%ld failed\n", i);
|
"%ld failed\n", i);
|
||||||
}
|
} else
|
||||||
|
fStreamInfo[i].hasCookie = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get info for all streams
|
// get info for all streams
|
||||||
|
Loading…
Reference in New Issue
Block a user