summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-07-12 13:32:14 +0200
committerAnton Khirnov <anton@khirnov.net>2022-11-28 10:34:10 +0100
commitbbf4d11edc8d5b35a446bd8d02e5ee7f197d6669 (patch)
tree5167b7a9c9d16eb39be7f1a5e686fd7c927a2a9c
parent2770d1f79d9676e7d5f1cb046ad222a74a115595 (diff)
lavc/adxenc: rescale packet duration according to timebase
The timebase does not always have to be 1/samplerate.
-rw-r--r--libavcodec/adxenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c
index 153c91b852..e1bf344b01 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;
}