[FFmpeg-devel] [PATCH] avformat/mux: rewrite guessing the packet duration
smarsufansmarsu196 at gmail.com
smarsufansmarsu196 at gmail.com
Mon Dec 28 05:20:23 EET 2020
From: smarsufan <smarsufan at tencent.com>
---
libavformat/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 84c56ac6ba..3356ba6bf5 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -620,7 +620,7 @@ static int compute_muxer_pkt_fields(AVFormatContext *s, AVStream *st, AVPacket *
case AVMEDIA_TYPE_AUDIO:
frame_size = (pkt->flags & AV_PKT_FLAG_UNCODED_FRAME) ?
(*(AVFrame **)pkt->data)->nb_samples :
- av_get_audio_frame_duration(st->codec, pkt->size);
+ av_get_audio_frame_duration2(st->codecpar, pkt->size);
/* HACK/FIXME, we skip the initial 0 size packets as they are most
* likely equal to the encoder delay, but it would be better if we
--
2.24.3 (Apple Git-128)
More information about the ffmpeg-devel
mailing list