diff mbox series

[FFmpeg-devel] avformat/mux: rewrite guessing the packet duration

Message ID 20210101120058.21303-1-smarsu196@gmail.com
State New
Headers show
Series [FFmpeg-devel] avformat/mux: rewrite guessing the packet duration
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

From: smarsufan <smarsu196@gmail.com>

Signed-off-by: smarsufan <smarsu196@gmail.com>
---
 libavformat/mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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