[FFmpeg-devel] [PATCH] ffserver: factorize opt_audio/video_codec
Stefano Sabatini
stefasab at gmail.com
Wed Nov 27 15:54:44 CET 2013
On date Wednesday 2013-11-27 14:15:39 +0100, Clément Bœsch encoded:
> On Wed, Nov 27, 2013 at 01:59:25PM +0100, Stefano Sabatini wrote:
> > Simplify.
> > ---
> > ffserver.c | 27 ++++++++-------------------
> > 1 file changed, 8 insertions(+), 19 deletions(-)
> >
> > diff --git a/ffserver.c b/ffserver.c
> > index 5ecdb08..d9add4a 100644
> > --- a/ffserver.c
> > +++ b/ffserver.c
> > @@ -3942,24 +3942,13 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
> > memcpy(st->codec, av, sizeof(AVCodecContext));
> > }
> >
> > -static enum AVCodecID opt_audio_codec(const char *arg)
> > +static enum AVCodecID opt_codec(const char *name, enum AVMediaType type)
> > {
> > - AVCodec *p= avcodec_find_encoder_by_name(arg);
> > + AVCodec *codec = avcodec_find_encoder_by_name(name);
>
> nit: "enc" looks like a more appropriate name
Pushed.
--
FFmpeg = Foolish Frightening Magnificient Plastic Efficient Generator
More information about the ffmpeg-devel
mailing list