From a08f6a39d8b0692e2aaca54d60e11922547a7abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 19 Mar 2008 17:15:12 +0000 Subject: [PATCH] Return B_ERROR for the FindKeyFrameFor*() methods, unless the time/frame is 0, in which case it is almost save to assume it is a keyframe. Added TODO though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24474 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/media/MediaTrack.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/kits/media/MediaTrack.cpp b/src/kits/media/MediaTrack.cpp index ec182c4400..427e663293 100644 --- a/src/kits/media/MediaTrack.cpp +++ b/src/kits/media/MediaTrack.cpp @@ -434,9 +434,14 @@ status_t BMediaTrack::FindKeyFrameForTime(bigtime_t *inout_time, int32 flags) const { + // TODO: let the codec handle this, but it is almost + // save to assume that frame at time 0 is a keyframe + if (*inout_time == 0) + return B_OK; + UNIMPLEMENTED(); - return B_OK; + return B_ERROR; } @@ -444,9 +449,14 @@ status_t BMediaTrack::FindKeyFrameForFrame(int64 *inout_frame, int32 flags) const { + // TODO: let the codec handle this, but it is almost + // save to assume that frame 0 is a keyframe + if (*inout_frame == 0) + return B_OK; + UNIMPLEMENTED(); - return B_OK; + return B_ERROR; }