[FFmpeg-cvslog] avcodec/cfhdenc: use pts instead of frame number

Paul B Mahol git at videolan.org
Fri Feb 19 22:25:27 EET 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Feb 19 20:58:41 2021 +0100| [82472afe183bbab7adf31ad9b61874421293690d] | committer: Paul B Mahol

avcodec/cfhdenc: use pts instead of frame number

Makes encodes bitexact with different number of threads.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82472afe183bbab7adf31ad9b61874421293690d
---

 libavcodec/cfhdenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c
index 5554baefa3..7b6b3c92f2 100644
--- a/libavcodec/cfhdenc.c
+++ b/libavcodec/cfhdenc.c
@@ -650,7 +650,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     bytestream2_put_be16(pby, avctx->height);
 
     bytestream2_put_be16(pby, -FrameNumber);
-    bytestream2_put_be16(pby, avctx->frame_number);
+    bytestream2_put_be16(pby, frame->pts & 0xFFFF);
 
     bytestream2_put_be16(pby, Precision);
     bytestream2_put_be16(pby, avctx->pix_fmt == AV_PIX_FMT_YUV422P10 ? 10 : 12);



More information about the ffmpeg-cvslog mailing list