[FFmpeg-devel] [PATCH 1/3] libvorbis: Hook up min/max bitrate

Baptiste Coudurier baptiste.coudurier
Fri Jun 4 08:20:54 CEST 2010


Hi David,

On 6/3/10 9:41 PM, David Conrad wrote:
> ---
>   libavcodec/libvorbis.c |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
> index 81d328a..6772ee4 100644
> --- a/libavcodec/libvorbis.c
> +++ b/libavcodec/libvorbis.c
> @@ -60,9 +60,12 @@ static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avcco
>                   avccontext->global_quality / (float)FF_QP2LAMBDA / 10.0))
>               return -1;
>       } else {
> +        int minrate = avccontext->rc_min_rate>  0 ? avccontext->rc_min_rate : -1;
> +        int maxrate = avccontext->rc_min_rate>  0 ? avccontext->rc_max_rate : -1;
> +
>           /* constant bitrate */
>           if(vorbis_encode_setup_managed(vi, avccontext->channels,
> -                avccontext->sample_rate, -1, avccontext->bit_rate, -1))
> +                avccontext->sample_rate, minrate, avccontext->bit_rate, maxrate))
>               return -1;
>
>   #ifdef OGGVORBIS_VBR_BY_ESTIMATE

IMHO apply and add yourself as maintainer :)

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list