Video callbacks called even though no new image is available
Posted: 18 Feb 2016 14:31
Hi
I've just stumbled across this particular issue with the video callbacks using libVLC 2.2.1 on windows:
- I'm opening an RTSP stream on a network camera (Axis camera in this case with a required framerate at 8 fps)
- I'm setting the video callbacks using libvlc_video_set_callbacks
- In the unlock CB I check that new image buffer is actually different from the previous one (using memcmp)
=> every frame is received at least twice. Dumping media_player_get_time shows that when these duplicate frames are received player time is not incremented
My question is why is the media player calling the video callbacks when it's not receiving actual images? or maybe I forgot to set a flag in the initialization of the player?
Obviously I could check the player time but when used with HTTP based MJPG streams this time stays at 0. I could also check that image is not the same but I want to be able to detect that a video stream is actually frozen...
Thanks
Sebastien
I've just stumbled across this particular issue with the video callbacks using libVLC 2.2.1 on windows:
- I'm opening an RTSP stream on a network camera (Axis camera in this case with a required framerate at 8 fps)
- I'm setting the video callbacks using libvlc_video_set_callbacks
- In the unlock CB I check that new image buffer is actually different from the previous one (using memcmp)
=> every frame is received at least twice. Dumping media_player_get_time shows that when these duplicate frames are received player time is not incremented
My question is why is the media player calling the video callbacks when it's not receiving actual images? or maybe I forgot to set a flag in the initialization of the player?
Obviously I could check the player time but when used with HTTP based MJPG streams this time stays at 0. I could also check that image is not the same but I want to be able to detect that a video stream is actually frozen...
Thanks
Sebastien