Don't call Reader methods with invalid cookies
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26986 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9e5d812407
commit
ac847fc895
@ -151,6 +151,9 @@ int64
|
||||
MediaExtractor::CountFrames(int32 stream) const
|
||||
{
|
||||
CALLED();
|
||||
if (fStreamInfo[stream].status != B_OK)
|
||||
return 0LL;
|
||||
|
||||
int64 frameCount;
|
||||
bigtime_t duration;
|
||||
media_format format;
|
||||
@ -168,6 +171,10 @@ bigtime_t
|
||||
MediaExtractor::Duration(int32 stream) const
|
||||
{
|
||||
CALLED();
|
||||
|
||||
if (fStreamInfo[stream].status != B_OK)
|
||||
return 0LL;
|
||||
|
||||
int64 frameCount;
|
||||
bigtime_t duration;
|
||||
media_format format;
|
||||
|
Loading…
Reference in New Issue
Block a user