Revision 69ae8acb Chunkiser/input-stream-avs.c

View differences:

Chunkiser/input-stream-avs.c
90 90
  if (fps.num == 0) {
91 91
    fps = st->r_frame_rate;
92 92
  }
93
  pts = av_rescale_q(pkt->pts, st->time_base, (AVRational){fps.den, fps.num}),
94
  pts += av_rescale_q(base_ts, AV_TIME_BASE_Q, (AVRational){fps.den, fps.num});
93
  if (pkt->pts != AV_NOPTS_VALUE) {
94
    pts = av_rescale_q(pkt->pts, st->time_base, (AVRational){fps.den, fps.num}),
95
    pts += av_rescale_q(base_ts, AV_TIME_BASE_Q, (AVRational){fps.den, fps.num});
96
  } else {
97
    pts = -1;
98
  }
95 99
  dprintf("pkt->pts=%ld PTS=%d",pkt->pts, pts);
96
  dts = av_rescale_q(pkt->dts, st->time_base, (AVRational){fps.den, fps.num});
97
  dts += av_rescale_q(base_ts, AV_TIME_BASE_Q, (AVRational){fps.den, fps.num});
100
  if (pkt->dts != AV_NOPTS_VALUE) {
101
    dts = av_rescale_q(pkt->dts, st->time_base, (AVRational){fps.den, fps.num});
102
    dts += av_rescale_q(base_ts, AV_TIME_BASE_Q, (AVRational){fps.den, fps.num});
103
  } else {
104
    fprintf(stderr, "No DTS???\n");
105
    dts = 0;
106
  }
98 107
  dprintf(" DTS=%d\n",dts);
99 108
  frame_header_write(data, size, pts, dts);
100 109
}

Also available in: Unified diff