X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmux.c;h=55add43ebb8da5bd1971047ff6c6a8ca988ba332;hb=609d5db8035c868be034892a33762779a40ab8b9;hp=dbb9b55f39c9949ced1bfadeedc03e73ab6ad952;hpb=5ff2b33401ec0ac6a238d02e56100b7bce8afefe;p=ffmpeg diff --git a/libavformat/mux.c b/libavformat/mux.c index dbb9b55f39c..55add43ebb8 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -521,7 +521,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt) case AVMEDIA_TYPE_AUDIO: frame_size = (pkt->flags & AV_PKT_FLAG_UNCODED_FRAME) ? ((AVFrame *)pkt->data)->nb_samples : - ff_get_audio_frame_size(st->codec, pkt->size, 1); + av_get_audio_frame_duration(st->codec, 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