YUNPM get frame is black

Hi, I am trying to use YUNPM to get frames of video onto a BufferedImage. My method works for the first 3 frames but then stops returning a bytebuffer, just null. Here is what I am doing:

File film = new File(path.getAbsolutePath()+"\\Assets\\Movies\\1.mp4");//This part works as it plays the sound from the sample video
player = new MoviePlayer(film);

Then to get a frame

player.tick();
ByteBuffer b = player.movie.videoStream().pollFrameData();

After the first 3 times it returns null. It is displaying correctly at least one frame, but I’m not sure the 2nd and 3rd are actually different from the first it displays. I have also tried the following after the above

player.movie.videoStream().freeFrameData(b);
player.movie.onUpdatedVideoFrame();

And while this does let me get more than 3 frames, they are bizzare colours and all over the place, with it eventually giving me


java.lang.IllegalArgumentException: Number of remaining buffer elements is 528384, must be at least 921600.

Has anyone else used this and knows what I am doing wrong?