[FFmpeg-devel] [PATCH 3/3] avcodec/libx264: add a check for the prft AVCodecContext export_side_data flag

James Almer jamrial at gmail.com
Mon Feb 10 20:26:46 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..a08fe0ce76 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->export_side_data & AV_CODEC_EXPORT_DATA_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