mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
avconv: compute next_pts from input packet duration when possible.
This commit is contained in:
parent
2092232581
commit
741a05a293
4
avconv.c
4
avconv.c
@ -1747,7 +1747,9 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
|
|||||||
}
|
}
|
||||||
ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts,
|
ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts,
|
||||||
decoded_frame->pkt_dts);
|
decoded_frame->pkt_dts);
|
||||||
if (ist->st->codec->time_base.num != 0) {
|
if (pkt->duration)
|
||||||
|
ist->next_pts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
|
||||||
|
else if (ist->st->codec->time_base.num != 0) {
|
||||||
int ticks = ist->st->parser ? ist->st->parser->repeat_pict + 1 :
|
int ticks = ist->st->parser ? ist->st->parser->repeat_pict + 1 :
|
||||||
ist->st->codec->ticks_per_frame;
|
ist->st->codec->ticks_per_frame;
|
||||||
ist->next_pts += ((int64_t)AV_TIME_BASE *
|
ist->next_pts += ((int64_t)AV_TIME_BASE *
|
||||||
|
Loading…
Reference in New Issue
Block a user