On Tue, Nov 11, 2014 at 08:31:26AM +0100, Lukasz Marek wrote:
> Signed-off-by: Lukasz Marek <lukasz.m.lu...@gmail.com>
> ---
>  ffmpeg_opt.c | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
> index 77ef0c4..1b3f73a 100644
> --- a/ffmpeg_opt.c
> +++ b/ffmpeg_opt.c
> @@ -1036,11 +1036,12 @@ static int get_preset_file_2(const char *preset_name, 
> const char *codec_name, AV
>      return ret;
>  }
>  
> -static void choose_encoder(OptionsContext *o, AVFormatContext *s, 
> OutputStream *ost)
> +static void choose_encoder(OptionsContext *o, AVFormatContext *s, 
> OutputStream *ost, const AVCodec *forced_codec)
>  {
> -    char *codec_name = NULL;
> +    const char *codec_name = forced_codec ? forced_codec->name : NULL;
>  
> -    MATCH_PER_STREAM_OPT(codec_names, str, codec_name, s, ost->st);
> +    if (!codec_name)
> +        MATCH_PER_STREAM_OPT(codec_names, str, codec_name, s, ost->st);
>      if (!codec_name) {
>          ost->st->codec->codec_id = av_guess_codec(s->oformat, NULL, 
> s->filename,
>                                                    NULL, 
> ost->st->codec->codec_type);

i think its simpler to set the codec name than to add a way to bypass
it, see opt_target()


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to