Merge branch 'dts-fix'

This commit is contained in:
Ari Koivula 2016-10-28 19:06:22 +03:00
commit 98a0d54b70
2 changed files with 5 additions and 0 deletions

View file

@ -190,6 +190,9 @@ static void* input_read_thread(void* in_args)
goto done; goto done;
} }
// Set PTS to make sure we pass it on correctly.
frame_in->pts = frames_read;
bool read_success = yuv_io_read(args->input, bool read_success = yuv_io_read(args->input,
args->opts->config->width, args->opts->config->width,
args->opts->config->height, args->opts->config->height,

View file

@ -823,6 +823,8 @@ static void encoder_set_source_picture(encoder_state_t * const state, kvz_pictur
state->tile->frame->rec = kvz_image_copy_ref(frame); state->tile->frame->rec = kvz_image_copy_ref(frame);
} else { } else {
state->tile->frame->rec = kvz_image_alloc(state->encoder_control->chroma_format, frame->width, frame->height); state->tile->frame->rec = kvz_image_alloc(state->encoder_control->chroma_format, frame->width, frame->height);
state->tile->frame->rec->dts = frame->dts;
state->tile->frame->rec->pts = frame->pts;
} }
kvz_videoframe_set_poc(state->tile->frame, state->frame->poc); kvz_videoframe_set_poc(state->tile->frame, state->frame->poc);