[FFmpeg-devel] [PATCH 2/2] avcodec/libx264: add a check for the export_prft AVCodecContext flag

James Almer jamrial at gmail.com
Thu Jan 23 22:25:35 EET 2020


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/libx264.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index ca8f6c0873..7cb716e13d 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -322,7 +322,9 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
         x4->pic.i_pts  = frame->pts;
 
         x4->reordered_opaque[x4->next_reordered_opaque].reordered_opaque = frame->reordered_opaque;
-        x4->reordered_opaque[x4->next_reordered_opaque].wallclock = av_gettime();
+        x4->reordered_opaque[x4->next_reordered_opaque].wallclock = wallclock;
+        if (ctx->flags2 & AV_CODEC_FLAG2_EXPORT_PRFT)
+            x4->reordered_opaque[x4->next_reordered_opaque].wallclock = av_gettime();
         x4->pic.opaque = &x4->reordered_opaque[x4->next_reordered_opaque];
         x4->next_reordered_opaque++;
         x4->next_reordered_opaque %= x4->nb_reordered_opaque;
-- 
2.25.0



More information about the ffmpeg-devel mailing list