mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-02 17:12:49 +02:00
avconv: estimate next_dts from framerate if it is set.
This commit is contained in:
parent
b34856a116
commit
722410ade5
4
avconv.c
4
avconv.c
@ -2121,6 +2121,10 @@ static int output_packet(InputStream *ist,
|
|||||||
ret = transcode_video (ist, &avpkt, &got_output, &pkt_pts);
|
ret = transcode_video (ist, &avpkt, &got_output, &pkt_pts);
|
||||||
if (avpkt.duration)
|
if (avpkt.duration)
|
||||||
ist->next_dts += av_rescale_q(avpkt.duration, ist->st->time_base, AV_TIME_BASE_Q);
|
ist->next_dts += av_rescale_q(avpkt.duration, ist->st->time_base, AV_TIME_BASE_Q);
|
||||||
|
else if (ist->st->r_frame_rate.num)
|
||||||
|
ist->next_dts += av_rescale_q(1, (AVRational){ist->st->r_frame_rate.den,
|
||||||
|
ist->st->r_frame_rate.num},
|
||||||
|
AV_TIME_BASE_Q);
|
||||||
else if (ist->st->codec->time_base.num != 0) {
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user