diff mbox series

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

Message ID 20200202222307.10074-3-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/3] avcodec: add an AVCodecContext field to signal types of packet, frame, and coded stream side data to export
Related show


Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork fail Make fate failed

Commit Message

James Almer Feb. 2, 2020, 10:23 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
 libavcodec/libx264.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series


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->nb_reordered_opaque;