Martin Storsjö | 30 Jun 2012 10:31

[PATCH] avconv: Pass the actual chosen encoder to filter_codec_opts

This allows passing the right options to encoders when there's more
than one encoder for a certain codec id.
---
 avconv.c   |    4 ++--
 avplay.c   |    2 +-
 cmdutils.c |    9 +++++----
 cmdutils.h |    4 +++-
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/avconv.c b/avconv.c
index 3eb249d..3a7cebf 100644
--- a/avconv.c
+++ b/avconv.c
 <at>  <at>  -3441,7 +3441,7  <at>  <at>  static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
         ist->file_index = nb_input_files;
         ist->discard = 1;
         st->discard  = AVDISCARD_ALL;
-        ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, ic, st);
+        ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, ic, st, NULL);

         ist->ts_scale = 1.0;
         MATCH_PER_STREAM_OPT(ts_scale, dbl, ist->ts_scale, ic, st);
 <at>  <at>  -3768,7 +3768,7  <at>  <at>  static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext
*oc, e
     st->codec->codec_type = type;
     choose_encoder(o, oc, ost);
     if (ost->enc) {
-        ost->opts  = filter_codec_opts(codec_opts, ost->enc->id, oc, st);
+        ost->opts  = filter_codec_opts(codec_opts, ost->enc->id, oc, st, ost->enc);
     }
(Continue reading)

Luca Barbato | 30 Jun 2012 12:38
Picon
Favicon
Gravatar

Re: [PATCH] avconv: Pass the actual chosen encoder to filter_codec_opts

On 06/30/2012 10:31 AM, Martin Storsjö wrote:
> This allows passing the right options to encoders when there's more
> than one encoder for a certain codec id.
> ---
>  avconv.c   |    4 ++--
>  avplay.c   |    2 +-
>  cmdutils.c |    9 +++++----
>  cmdutils.h |    4 +++-
>  4 files changed, 11 insertions(+), 8 deletions(-)
> 

Seems ok.

--

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

_______________________________________________
libav-devel mailing list
libav-devel <at> libav.org
https://lists.libav.org/mailman/listinfo/libav-devel
Anton Khirnov | 30 Jun 2012 14:42

Re: [PATCH] avconv: Pass the actual chosen encoder to filter_codec_opts


On Sat, 30 Jun 2012 11:31:09 +0300, Martin Storsjö <martin <at> martin.st> wrote:
> This allows passing the right options to encoders when there's more
> than one encoder for a certain codec id.
> ---
>  avconv.c   |    4 ++--
>  avplay.c   |    2 +-
>  cmdutils.c |    9 +++++----
>  cmdutils.h |    4 +++-
>  4 files changed, 11 insertions(+), 8 deletions(-)
> 

Prefix the commit message with cmdutils instead of avconv.

Otherwise looks fine.

--

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
libav-devel <at> libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Gmane