mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
mpegvideo_enc: force encoding delay of at least 1 frame when low_delay=0
This allows the following commit to extrapolate better dts for the first frame. Pts difference between the first two frames is reused as the difference between pts and dts of the first frame.
This commit is contained in:
parent
5be805d38c
commit
5455384219
@ -890,7 +890,8 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
|
||||
AVFrame *pic = NULL;
|
||||
int64_t pts;
|
||||
int i;
|
||||
const int encoding_delay = s->max_b_frames;
|
||||
const int encoding_delay = s->max_b_frames ? s->max_b_frames :
|
||||
(s->low_delay ? 0 : 1);
|
||||
int direct = 1;
|
||||
|
||||
if (pic_arg) {
|
||||
|
Loading…
Reference in New Issue
Block a user