Merge commit '51fc88e7467169031b20b9983d80456b893a9fa3'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 5 Aug 2013 07:32:31 +0000 (09:32 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 5 Aug 2013 07:32:31 +0000 (09:32 +0200)
* commit '51fc88e7467169031b20b9983d80456b893a9fa3':
  avconv: improve some variable names

Conflicts:
ffmpeg_filter.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
ffmpeg_filter.c

diff --cc ffmpeg_filter.c
@@@ -650,8 -431,8 +650,8 @@@ static int configure_input_video_filter
      snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
               ist->file_index, ist->st->index);
  
-     if ((ret = avfilter_graph_create_filter(&ifilter->filter, filter, name,
+     if ((ret = avfilter_graph_create_filter(&ifilter->filter, buffer_filt, name,
 -                                            args, NULL, fg->graph)) < 0)
 +                                            args.str, NULL, fg->graph)) < 0)
          return ret;
  
      if (ist->framerate.num) {
@@@ -699,28 -462,23 +699,28 @@@ static int configure_input_audio_filter
                                          AVFilterInOut *in)
  {
      AVFilterContext *first_filter = in->filter_ctx;
-     AVFilter *filter = avfilter_get_by_name("abuffer");
+     const AVFilter *abuffer_filt = avfilter_get_by_name("abuffer");
      InputStream *ist = ifilter->ist;
      int pad_idx = in->pad_idx;
 -    char args[255], name[255];
 +    AVBPrint args;
 +    char name[255];
      int ret;
  
 -    snprintf(args, sizeof(args), "time_base=%d/%d:sample_rate=%d:sample_fmt=%s"
 -             ":channel_layout=0x%"PRIx64,
 +    av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC);
 +    av_bprintf(&args, "time_base=%d/%d:sample_rate=%d:sample_fmt=%s",
               1, ist->st->codec->sample_rate,
               ist->st->codec->sample_rate,
 -             av_get_sample_fmt_name(ist->st->codec->sample_fmt),
 -             ist->st->codec->channel_layout);
 +             av_get_sample_fmt_name(ist->st->codec->sample_fmt));
 +    if (ist->st->codec->channel_layout)
 +        av_bprintf(&args, ":channel_layout=0x%"PRIx64,
 +                   ist->st->codec->channel_layout);
 +    else
 +        av_bprintf(&args, ":channels=%d", ist->st->codec->channels);
      snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
               ist->file_index, ist->st->index);
  
-     if ((ret = avfilter_graph_create_filter(&ifilter->filter, filter,
+     if ((ret = avfilter_graph_create_filter(&ifilter->filter, abuffer_filt,
 -                                            name, args, NULL,
 +                                            name, args.str, NULL,
                                              fg->graph)) < 0)
          return ret;