[FFmpeg-devel] [PATCH] avcodec/mpegvideo: use constants for rc_strategy

Clément Bœsch u at pkh.me
Fri Dec 4 15:54:11 CET 2015


On Mon, Nov 23, 2015 at 01:37:00PM +0100, Michael Niedermayer wrote:
> On Mon, Nov 23, 2015 at 11:06:14AM +0100, Clément Bœsch wrote:
> > On Sat, Nov 21, 2015 at 10:26:17PM +0100, Michael Niedermayer wrote:
> > > On Sat, Nov 21, 2015 at 09:28:31PM +0100, Clément Bœsch wrote:
> > > > ---
> > > >  libavcodec/mpegvideo.h   | 10 +++++++++-
> > > >  libavcodec/ratecontrol.c | 10 +++++++---
> > > >  2 files changed, 16 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
> > > > index df1a13f..271ef5e 100644
> > > > --- a/libavcodec/mpegvideo.h
> > > > +++ b/libavcodec/mpegvideo.h
> > > > @@ -557,6 +557,12 @@ typedef struct MpegEncContext {
> > > >  #define FF_MPV_FLAG_NAQ          0x0010
> > > >  #define FF_MPV_FLAG_MV0          0x0020
> > > >  
> > > > +enum rc_strategy {
> > > > +    MPV_RC_STRATEGY_FFMPEG,
> > > > +    MPV_RC_STRATEGY_XVID,
> > > > +    NB_MPV_RC_STRATEGY
> > > 
> > > maybe the values should be hardcoded here as in
> > > MPV_RC_STRATEGY_FFMPEG = ...
> > > 
> > 
> > The assert prevents the mismatch from happening. Also, it's going to be
> > more annoying to patch the enum with the deprecation of
> > FF_API_RC_STRATEGY, so I prefer it that way.
> 
> sure, whatever you prefer
> 

pushed, thanks

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151204/3a837bea/attachment.sig>


More information about the ffmpeg-devel mailing list