From d18de19d8a1bb49aa63349a57191d3d8cf013407 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Fri, 28 Oct 2016 19:05:47 +0300 Subject: [PATCH] Fix DTS and PTS not being passed on through lib API Fixes "cur_dts is invalid" warning from FFmpeg. --- src/encoderstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/encoderstate.c b/src/encoderstate.c index 3e6830af..b53f994c 100644 --- a/src/encoderstate.c +++ b/src/encoderstate.c @@ -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); } else { 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);