From 2299a8e77d894aeedf01c159f4f6c2b037d26d34 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Jul 2022 13:32:14 +0200 Subject: lavc/adxenc: rescale packet duration according to timebase The timebase does not always have to be 1/samplerate. --- libavcodec/adxenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c index 0a2e5092cd..5aa730801b 100644 --- a/libavcodec/adxenc.c +++ b/libavcodec/adxenc.c @@ -184,7 +184,7 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } avpkt->pts = frame->pts; - avpkt->duration = frame->nb_samples; + avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples); *got_packet_ptr = 1; return 0; } -- cgit v1.2.3