summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-14 02:42:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-14 03:03:56 +0200
commit7b59217b60cc7133766ea33ee8519efda9ec4c5c (patch)
treef21017cdab258029829234f5d6471c8d87688eca /libavformat/utils.c
parented488d1535d9e7b729dda2a6ffe8ecff481dad83 (diff)
Move WMA case from ff_get_audio_frame_size() to av_get_audio_frame_duration()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c695e372a3..364796aad4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -722,12 +722,7 @@ int ff_get_audio_frame_size(AVCodecContext *enc, int size, int mux)
if ((frame_size = av_get_audio_frame_duration(enc, size)) > 0)
return frame_size;
- //For WMA we currently have no other means to calculate duration thus we
- //do it here by assuming CBR, which is true for all known cases.
- if (!mux && enc->bit_rate>0 && size>0 && enc->sample_rate>0 && enc->block_align>1) {
- if (enc->codec_id == AV_CODEC_ID_WMAV1 || enc->codec_id == AV_CODEC_ID_WMAV2)
- return ((int64_t)size * 8 * enc->sample_rate) / enc->bit_rate;
- }
+
return -1;
}