Skip to content

Commit

Permalink
show error message when PTS does not match the video frame
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Jul 13, 2023
1 parent 0a25fd5 commit 3242f99
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion custom_tests/toxav_ts_sync_test_02.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,15 @@ static void t_toxav_receive_video_frame_pts_cb(ToxAV *av, uint32_t friend_number
#endif

uint64_t tt = readUint64FromYUVFrame(y);
dbg(9, "[%d]: TT=%lu outdecoder=%lu delta=%d\n", num, (unsigned long)tt, (unsigned long)pts, (int)((long)pts - (long)tt));
int delta_ = (int)((long)pts - (long)tt);
dbg(9, "[%d]: TT=%lu outdecoder=%lu delta=%d\n", num, (unsigned long)tt, (unsigned long)pts, delta_);

if (delta_ != 0)
{
// HINT: this can happen, but should actually never happen. need more investigation.
dbg(9, "[%d]: ERROR: video frame PTS and reported PTS do not agree\n", num);
// exit(1);
}

usleep(4 * 1000);
//uint8_t chk1 = *(y + (ystride * height) - 1);
Expand Down

0 comments on commit 3242f99

Please sign in to comment.