{
...
cur_time = frame->pkt_pts * av_q2d(vedio_timebase);
LOG_I(video, 0, "Frame dts: %d - pts: %d\r\n", \
frame->pkt_dts, frame->pkt_pts);
LOG_I(video, 0 , "cur time %lf.\r\n", cur_time);
LOG_I(video, 0, "time base %d - %d; %d - %d\r\n", \
is->time_base.num, is->time_base.den, vedio_timebase.num, vedio_timebase.den);
...
}
[T: 2020-03-05 21:20:09.552905 M: video F: vedio_play(154) C: info]: cur time 0.000000.
[T: 2020-03-05 21:20:09.552936 M: video F: vedio_play(157) C: info]: time base 1 - 12800; 1 - 12800
[T: 2020-03-05 21:20:09.583301 M: video F: vedio_play(152) C: info]: Frame dts: 12138932 - pts: 512
[T: 2020-03-05 21:20:09.583371 M: video F: vedio_play(154) C: info]: cur time 0.040000.
[T: 2020-03-05 21:20:09.583407 M: video F: vedio_play(157) C: info]: time base 1 - 12800; 1 - 12800
[T: 2020-03-05 21:20:09.610150 M: video F: vedio_play(152) C: info]: Frame dts: 12138932 - pts: 1024
[T: 2020-03-05 21:20:09.610233 M: video F: vedio_play(154) C: info]: cur time 0.080000.
[T: 2020-03-05 21:20:09.610269 M: video F: vedio_play(157) C: info]: time base 1 - 12800; 1 - 12800
[T: 2020-03-05 21:20:09.635134 M: video F: vedio_play(152) C: info]: Frame dts: 12138932 - pts: 1536
[T: 2020-03-05 21:20:09.635223 M: video F: vedio_play(154) C: info]: cur time 0.120000.
[T: 2020-03-05 21:20:09.635268 M: video F: vedio_play(157) C: info]: time base 1 - 12800; 1 - 12800
LOG_I(video, 0, "Frame dts: %d - pts: %d - cur_time %f . time base %d - %d; %d - %d\r\n", \
frame->pkt_dts, frame->pkt_pts, cur_time, \
is->time_base.num, is->time_base.den, vedio_timebase.num, vedio_timebase.den);
[T: 2020-03-05 21:21:19.054939 M: video F: vedio_play(162) C: info]: Frame dts: 0 - pts: 0 - cur_time 0.000000 . time base 0 - 0; 1 - 12800
[T: 2020-03-05 21:21:19.083174 M: video F: vedio_play(162) C: info]: Frame dts: 0 - pts: 512 - cur_time 0.000000 . time base 1202590843 - 1067743969; 1 - 12800
[T: 2020-03-05 21:21:19.108702 M: video F: vedio_play(162) C: info]: Frame dts: 0 - pts: 1024 - cur_time 0.000000 . time base 1202590843 - 1068792545; 1 - 12800
[T: 2020-03-05 21:21:19.135300 M: video F: vedio_play(162) C: info]: Frame dts: 0 - pts: 1536 - cur_time 0.000000 . time base -343597384 - 1069463633; 1 - 12800
[T: 2020-03-05 21:21:19.160635 M: video F: vedio_play(162) C: info]: Frame dts: 0 - pts: 2048 - cur_time 0.000000 . time base 1202590843 - 1069841121; 1 - 12800
[T: 2020-03-05 21:21:19.184589 M: video F: vedio_play(162) C: info]: Frame dts: 0 - pts: 2560 - cur_time 0.000000 . time base -1717986918 - 1070176665; 1 - 12800
为什么第一个和第二个打印相同的数据,第二次显示的内容会出现异常。