jvcleave / ofxOMXPlayer

OpenMax accelerated video player for openFrameworks on the Raspberry Pi 0-3. Does not work with RPI4
GNU General Public License v2.0
180 stars 61 forks source link

onVideoEnd() gets called 5-7 frames too early #62

Closed timonsku closed 9 years ago

timonsku commented 9 years ago

I just noticed that I consistently have skipped frames at the end of every video. This happens with all videos I tried, including Timecoded_Big_bunny_1.mov. I checked the current frame count within onVideoEnd() and got these results:

[notice ] bool ofxOMXPlayerEngine::openPlayer(int): duration SET: 33.3333
Debug: : Showing media item/home/pi/media/01Timecoded_Big_bunny_1.mov
[notice ] onVideoEnd at frame: 793 of 800

[notice ] bool ofxOMXPlayerEngine::openPlayer(int): duration SET: 2.52
[notice ] Debug: : Showing media item/home/pi/media/02_Idle Loop 720p.mov
[notice ] onVideoEnd at frame: 56 of 63

[notice ] bool ofxOMXPlayerEngine::openPlayer(int): duration SET: 11.92
[notice ] Debug: : Showing media item/home/pi/media/Test_Video_1280x1024_handbrake_high.mp4
[notice ] onVideoEnd at frame: 292 of 298

[notice ] bool ofxOMXPlayerEngine::openPlayer(int): duration SET: 10
[notice ] Debug: : Showing media item/home/pi/media/Test_Video_1920x1080_h264.mov
[notice ] onVideoEnd at frame: 295 of 300

This is consistent, every time the playlist plays I get exactly these numbers. Looping works fine, even though it reports some bogus frame numbers in a few cases.

I'm on Pi2 using the latest Raspbian Jessie. Maybe the issue lies within one of the used libraries that got updated? I'm fairly certain this hasn't happen before in Wheezy.

jvcleave commented 9 years ago

Sounds like #24