Re: [libav-devel] [PATCH] avconv: don't segfault on 0 input files.

2011-08-16 Thread Kostya
On Tue, Aug 16, 2011 at 12:18:04PM +0200, Kostya wrote:
> On Tue, Aug 16, 2011 at 12:12:14PM +0200, Anton Khirnov wrote:
> > ---
> >  avconv.c |2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/avconv.c b/avconv.c
> > index e9dc790..bbefa5f 100644
> > --- a/avconv.c
> > +++ b/avconv.c
> > @@ -3781,7 +3781,7 @@ static void opt_output_file(const char *filename)
> >  }
> >  
> >  /* copy global metadata by default */
> > -if (metadata_global_autocopy)
> > +if (metadata_global_autocopy && nb_input_files)
> >  av_dict_copy(&oc->metadata, input_files[0].ctx->metadata,
> >   AV_DICT_DONT_OVERWRITE);
> >  if (metadata_streams_autocopy)
> > -- 
> 
> looks OK but commit message is not complete: avconv -i infile still works fine
> so when can it segfault?

Disregard the message (it was zero _input_ files, not output). Patch OK.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] avconv: don't segfault on 0 input files.

2011-08-16 Thread Kostya
On Tue, Aug 16, 2011 at 12:12:14PM +0200, Anton Khirnov wrote:
> ---
>  avconv.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/avconv.c b/avconv.c
> index e9dc790..bbefa5f 100644
> --- a/avconv.c
> +++ b/avconv.c
> @@ -3781,7 +3781,7 @@ static void opt_output_file(const char *filename)
>  }
>  
>  /* copy global metadata by default */
> -if (metadata_global_autocopy)
> +if (metadata_global_autocopy && nb_input_files)
>  av_dict_copy(&oc->metadata, input_files[0].ctx->metadata,
>   AV_DICT_DONT_OVERWRITE);
>  if (metadata_streams_autocopy)
> -- 

looks OK but commit message is not complete: avconv -i infile still works fine
so when can it segfault?
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel