diff --git a/ffmpeg.c b/ffmpeg.c
index 21f8a1b..28e22d9 100644
|
a
|
b
|
static int output_packet(InputStream *ist, |
| 2283 | 2283 | |
| 2284 | 2284 | AVPacket avpkt; |
| 2285 | 2285 | |
| | 2286 | // when the input stream has just been initialized, we correct the dts with |
| | 2287 | // the pkt->pts to take into account seeking, but only if the stream is copied |
| | 2288 | if (pkt != NULL && |
| | 2289 | pkt->pts != AV_NOPTS_VALUE && |
| | 2290 | !ist->decoding_needed && |
| | 2291 | ist->dts != AV_NOPTS_VALUE && |
| | 2292 | ist->next_dts == AV_NOPTS_VALUE && |
| | 2293 | ist->pts == 0 && |
| | 2294 | ist->next_pts == AV_NOPTS_VALUE) |
| | 2295 | ist->dts += av_rescale_q(pkt->pts, ist->st->time_base, AV_TIME_BASE_Q); |
| | 2296 | |
| 2286 | 2297 | if (ist->next_dts == AV_NOPTS_VALUE) |
| 2287 | 2298 | ist->next_dts = ist->dts; |
| 2288 | 2299 | if (ist->next_pts == AV_NOPTS_VALUE) |