]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mux.c
Fix packet_buffer memory leak in avformat_free_context
[ffmpeg] / libavformat / mux.c
index dbb9b55f39c9949ced1bfadeedc03e73ab6ad952..55add43ebb8da5bd1971047ff6c6a8ca988ba332 100644 (file)
@@ -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