From c76b0b7ef6f2fa7a20c2d7d6b89876fb42dbd143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20Semhoun?= Date: Fri, 18 Jun 2021 00:28:39 +0200 Subject: [PATCH] Fix G729 packet duration Without this correction, timestamp is not incremented in case of transcoding --- lib/codeclib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/codeclib.c b/lib/codeclib.c index afc29f743..a6c6f263b 100644 --- a/lib/codeclib.c +++ b/lib/codeclib.c @@ -2467,6 +2467,7 @@ static int bcg729_encoder_input(encoder_t *enc, AVFrame **frame) { enc->avpkt->size = len; enc->avpkt->pts = (*frame)->pts; + enc->avpkt->duration = len * 8; // Duration is used by encoder_input_data for pts calculation return 0; }