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:
@@ -151,6 +151,9 @@ int64
|
|||||||
MediaExtractor::CountFrames(int32 stream) const
|
MediaExtractor::CountFrames(int32 stream) const
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
if (fStreamInfo[stream].status != B_OK)
|
||||||
|
return 0LL;
|
||||||
|
|
||||||
int64 frameCount;
|
int64 frameCount;
|
||||||
bigtime_t duration;
|
bigtime_t duration;
|
||||||
media_format format;
|
media_format format;
|
||||||
@@ -168,6 +171,10 @@ bigtime_t
|
|||||||
MediaExtractor::Duration(int32 stream) const
|
MediaExtractor::Duration(int32 stream) const
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
|
if (fStreamInfo[stream].status != B_OK)
|
||||||
|
return 0LL;
|
||||||
|
|
||||||
int64 frameCount;
|
int64 frameCount;
|
||||||
bigtime_t duration;
|
bigtime_t duration;
|
||||||
media_format format;
|
media_format format;
|
||||||
|
|||||||
Reference in New Issue
Block a user