diff --git a/libavformat/internal.h b/libavformat/internal.h index 08987c76be..30117069a9 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -337,8 +337,6 @@ void ff_free_stream(AVFormatContext *s, AVStream *st); void ff_compute_frame_duration(int *pnum, int *pden, AVStream *st, AVCodecParserContext *pc, AVPacket *pkt); -int ff_get_audio_frame_size(AVCodecContext *enc, int size, int mux); - unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id); enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag); diff --git a/libavformat/mux.c b/libavformat/mux.c index dbb9b55f39..55add43ebb 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 diff --git a/libavformat/utils.c b/libavformat/utils.c index 364796aad4..5d146d65e0 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -712,21 +712,6 @@ static int determinable_frame_size(AVCodecContext *avctx) return 0; } -/** - * Get the number of samples of an audio frame. Return -1 on error. - */ -int ff_get_audio_frame_size(AVCodecContext *enc, int size, int mux) -{ - int frame_size; - - if ((frame_size = av_get_audio_frame_duration(enc, size)) > 0) - return frame_size; - - - - return -1; -} - /** * Return the frame duration in seconds. Return 0 if not available. */ @@ -762,7 +747,7 @@ void ff_compute_frame_duration(int *pnum, int *pden, AVStream *st, } break; case AVMEDIA_TYPE_AUDIO: - frame_size = ff_get_audio_frame_size(st->codec, pkt->size, 0); + frame_size = av_get_audio_frame_duration(st->codec, pkt->size); if (frame_size <= 0 || st->codec->sample_rate <= 0) break; *pnum = frame_size;