handle invalid tracks better
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26913 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -442,21 +442,23 @@ movReader::GetStreamInfo(void *_cookie, int64 *frameCount, bigtime_t *duration,
|
|||||||
{
|
{
|
||||||
mov_cookie *cookie = (mov_cookie *)_cookie;
|
mov_cookie *cookie = (mov_cookie *)_cookie;
|
||||||
|
|
||||||
*frameCount = cookie->frame_count;
|
if (cookie) {
|
||||||
*duration = cookie->duration;
|
*frameCount = cookie->frame_count;
|
||||||
*format = cookie->format;
|
*duration = cookie->duration;
|
||||||
|
*format = cookie->format;
|
||||||
|
|
||||||
// Copy metadata to infoBuffer
|
// Copy metadata to infoBuffer
|
||||||
if (theFileReader->IsVideo(cookie->stream)) {
|
if (theFileReader->IsVideo(cookie->stream)) {
|
||||||
const VideoMetaData *video_format = theFileReader->VideoFormat(cookie->stream);
|
const VideoMetaData *video_format = theFileReader->VideoFormat(cookie->stream);
|
||||||
*infoBuffer = video_format->theVOL;
|
*infoBuffer = video_format->theVOL;
|
||||||
*infoSize = video_format->VOLSize;
|
*infoSize = video_format->VOLSize;
|
||||||
} else {
|
} else {
|
||||||
const AudioMetaData *audio_format = theFileReader->AudioFormat(cookie->stream);
|
const AudioMetaData *audio_format = theFileReader->AudioFormat(cookie->stream);
|
||||||
*infoBuffer = audio_format->theVOL;
|
*infoBuffer = audio_format->theVOL;
|
||||||
*infoSize = audio_format->VOLSize;
|
*infoSize = audio_format->VOLSize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user