printf double

{
    ...
    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
 

为什么第一个和第二个打印相同的数据,第二次显示的内容会出现异常。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值