Commit ce5edfdd authored by a1ex's avatar a1ex
Browse files

mlv_play: fix frame skipping during MLV playback, in "exact" mode

--HG--
branch : mlv_play
parent 705d001cb9d5
......@@ -1619,20 +1619,23 @@ static void mlv_play_mlv(char *filename, FILE **chunk_files, uint32_t chunk_coun
}
/* if in exact playback and this is a skippable VIDF frame */
if(mlv_play_exact_fps && (xrefs[block_xref_pos].frameType == MLV_FRAME_VIDF))
if(mlv_play_exact_fps)
{
uint32_t frames_to_skip = 0;
msg_queue_count(mlv_play_queue_fps, &frames_to_skip);
/* skip this frame if we are behind */
if(frames_to_skip > 0)
if (xrefs[block_xref_pos].frameType == MLV_FRAME_VIDF)
{
uint32_t temp = 0;
msg_queue_receive(mlv_play_queue_fps, &temp, 50);
uint32_t frames_to_skip = 0;
msg_queue_count(mlv_play_queue_fps, &frames_to_skip);
mlv_play_frames_skipped++;
block_xref_pos++;
continue;
/* skip this frame if we are behind */
if(frames_to_skip > 0)
{
uint32_t temp = 0;
msg_queue_receive(mlv_play_queue_fps, &temp, 50);
mlv_play_frames_skipped++;
block_xref_pos++;
continue;
}
}
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment