ffmpeg | branch: master | Tong Wu <wutong1...@outlook.com> | Mon Jul 8 23:13:22 2024 +0800| [5c8523cef11910c4a3713be18ce2084279b817a5] | committer: Lynne
lavc/hw_base_encode: correct the timestamp when input_order = decode_delay Fixed the command line: ffmpeg -hwaccel vaapi -pix_fmt nv12 -s:v widthxheight -i input.yuv -vf "hwupload" -c:v hevc_vaapi -bf 10 -b_depth 3 -vframes 3 -f null - Signed-off-by: Tong Wu <wutong1...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c8523cef11910c4a3713be18ce2084279b817a5 --- libavcodec/hw_base_encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hw_base_encode.c b/libavcodec/hw_base_encode.c index 6d5632c298..c1346e866c 100644 --- a/libavcodec/hw_base_encode.c +++ b/libavcodec/hw_base_encode.c @@ -472,7 +472,7 @@ static int hw_base_encode_send_frame(AVCodecContext *avctx, FFHWBaseEncodeContex // Fix timestamps if we hit end-of-stream before the initial decode // delay has elapsed. - if (ctx->input_order < ctx->decode_delay) + if (ctx->input_order <= ctx->decode_delay) ctx->dts_pts_diff = ctx->pic_end->pts - ctx->first_pts; } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".