diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-07-12 13:32:14 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-08-23 16:50:33 +0200 |
commit | 2299a8e77d894aeedf01c159f4f6c2b037d26d34 (patch) | |
tree | 1d97835fbd3fc6407860a7c536ffc2f6a5b33126 | |
parent | 4690b0782cf57aaa76385f162e9939001d6fcdf6 (diff) |
lavc/adxenc: rescale packet duration according to timebase
The timebase does not always have to be 1/samplerate.
-rw-r--r-- | libavcodec/adxenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |