vanwang / xuggle

Automatically exported from code.google.com/p/xuggle
0 stars 0 forks source link

seekKeyFrame fails seeking to first frame #238

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In the following code, ret is never >=0 (ie successful seek) for 
entryNum==0:

for(int entryNum=0; entryNum < numEntries; entryNum++){
  indexEntry = stream.getIndexEntry(entryNum);
  if(indexEntry.isKeyFrame()){
    IVideoPicture picture = IVideoPicture.make(coder.getPixelType(),
    coder.getWidth(), coder.getHeight());
    int ret = container.seekKeyFrame(stream.getIndex(), -1,
        indexEntry.getTimeStamp(), stream.getDuration(), 0);

indexEntry.getTimeStamp()==-0.2002 for entryNum==0

I've tried all sorts of combinations for minTimeStamp parameter of 
seekKeyFrame, doesn't make any difference. I got around it for entryNum==0 
by simply decoding packets from the start of the stream till I have a full 
picture and it is a keyFrame.

Original issue reported on code.google.com by nak...@gmail.com on 18 Feb 2010 at 3:55

GoogleCodeExporter commented 9 years ago
I should clarify it fails with error ERROR_UNKNOWN Operation not permitted

Original comment by nak...@gmail.com on 18 Feb 2010 at 3:57