[FFmpeg-devel] [PATCH] float values for libmp3lame quality

Måns Rullgård mans
Tue Sep 14 23:36:01 CEST 2010


James Darnley <james.darnley at gmail.com> writes:

> 2010/9/14 M?ns Rullg?rd <mans at mansr.com>:
>> James Darnley <james.darnley at gmail.com> writes:
>>> New patch with the scaling removed
>>>
>>> From 0e130a14baa9f65eba4cd2151e5cbf1785c936ec Mon Sep 17 00:00:00 2001
>>> From: James Darnley <james.darnley at gmail.com>
>>> Date: Tue, 14 Sep 2010 10:57:19 +0200
>>> Subject: [PATCH 3/3] float values for libmp3lame quality
>>>
>>> ---
>>> ?configure ? ? ? ? ? ? ? | ? ?7 ++++++-
>>> ?libavcodec/libmp3lame.c | ? ?3 ++-
>>> ?2 files changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index ae3d738..f5445d7 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -2709,7 +2709,12 @@ enabled libdirac ? && add_cflags $(pkg-config --cflags dirac) &&
>>> ? ? ? ? ? ? ? ? ? ? ? ?require ?libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init $(pkg-config --libs dirac)
>>> ?enabled libfaac ? ?&& require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
>>> ?enabled libgsm ? ? && require ?libgsm gsm/gsm.h gsm_create -lgsm
>>> -enabled libmp3lame && require ?libmp3lame lame/lame.h lame_init -lmp3lame
>>> +enabled libmp3lame && { check_lib lame/lame.h lame_get_VBR_quality -lmp3lame &&
>>> + ? ? ? ? ? ? ? ? ? ? ? ?check_lib lame/lame.h hip_decode_init -lmp3lame ||
>>> + ? ? ? ? ? ? ? ? ? ? ? ?die "ERROR: libmp3lame version must be >= 3.98.3"; }
>>> +# check for both functions to make sure it has the required feature but is newer
>>> +# than the fix to a bug in 3.98 through 3.98.2
>>
>> Please explain.
>>
>
> I refer to the bug/issue that causes the error on
> libavcodec/libmp3lame.c:181 "lame: output buffer too small (buffer
> index: %d, free bytes: %d)"
>
> I forget what the real problem is but lame say they've solve it on
> their end with 3.98.3.  Their changelog has this message: "Workaround
> for FFMPEG bug, which uses to call lame_encode_flush more than once in
> a loop"
>
> People in #ffmpeg on IRC used to have to tell people to stop using
> 3.98 through 3.98.2.  I haven't seen this in a while so it looks as
> though most have updated.
>
> The first function was introduced with 3.98.  The second function was
> added to the header in 3.98.3 so I could check for it alone but I
> don't know what would be preferred.

If a single test for a good version which has everything we need is
possible, do that.  It seems like replacing lame_init with
hip_decode_init should do it.

BTW, what is hip_decode_init?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list