From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 97F1B44E8A for ; Sun, 27 Nov 2022 17:09:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5BE0A68BCA4; Sun, 27 Nov 2022 19:06:26 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8DBE468B9A3 for ; Sun, 27 Nov 2022 19:06:05 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id C6FFD240499 for ; Sun, 27 Nov 2022 18:06:04 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 60-IvIoIbIdo for ; Sun, 27 Nov 2022 18:06:03 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 09606240D22 for ; Sun, 27 Nov 2022 18:05:52 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 1ABE73A264F for ; Sun, 27 Nov 2022 18:05:47 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 27 Nov 2022 18:03:49 +0100 Message-Id: <20221127170351.11477-28-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221127170351.11477-1-anton@khirnov.net> References: <20221127170351.11477-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 28/30] lavc/libx264: pass through frame durations to encoded packets X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- libavcodec/libx264.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 8944a7df36..b87db78fb4 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -52,6 +52,7 @@ typedef struct X264Opaque { int64_t reordered_opaque; int64_t wallclock; + int64_t duration; void *frame_opaque; AVBufferRef *frame_opaque_ref; @@ -461,6 +462,7 @@ static int setup_frame(AVCodecContext *ctx, const AVFrame *frame, } opaque->reordered_opaque = frame->reordered_opaque; + opaque->duration = frame->duration; opaque->wallclock = wallclock; if (ctx->export_side_data & AV_CODEC_EXPORT_DATA_PRFT) opaque->wallclock = av_gettime(); @@ -614,6 +616,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, out_opaque < &x4->reordered_opaque[x4->nb_reordered_opaque]) { ctx->reordered_opaque = out_opaque->reordered_opaque; wallclock = out_opaque->wallclock; + pkt->duration = out_opaque->duration; if (ctx->flags & AV_CODEC_FLAG_COPY_OPAQUE) { pkt->opaque = out_opaque->frame_opaque; -- 2.35.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".