Commit cb36a29615 for ffmpeg
commit cb36a29615d6e18831123199fd322ccfc6951078
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Sat Oct 24 07:34:30 2026 +0200
avcodec/jpeg2000dec: set AVFrame.pkt_dts
Copy the dts of the decoded packet to the frame. decode.c does this only
for decoders with the decode callback, so it got lost when 6287ad1f9b
moved the decoder to the receive_frame API, and frames decoded from
packets that carry only a dts have had no timestamp since.
Fixes: 6287ad1f9b
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 9282f7610e..7acb11710b 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -2948,6 +2948,7 @@ static int jpeg2000_receive_frame(AVCodecContext *avctx, AVFrame *frame)
return ret;
ret = jpeg2000_decode_frame(avctx, frame, avpkt);
+ frame->pkt_dts = avpkt->dts;
av_packet_unref(avpkt);
if (ret < 0)
return ret;