Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Apr 2013 21:23:11 +0000 (23:23 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Apr 2013 21:23:16 +0000 (23:23 +0200)
* qatar/master:
  cmdutils: Fix build with lavfi disabled
  flvenc: do not mux more than one stream per type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
cmdutils.c
libavformat/flvenc.c

diff --cc cmdutils.c
@@@ -1635,9 -1268,9 +1635,10 @@@ static void show_help_muxer(const char 
          show_help_children(fmt->priv_class, AV_OPT_FLAG_ENCODING_PARAM);
  }
  
+ #if CONFIG_AVFILTER
  static void show_help_filter(const char *name)
  {
 +#if CONFIG_AVFILTER
      const AVFilter *f = avfilter_get_by_name(name);
      int i, count;
  
      }
      if (f->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS)
          printf("        dynamic (depending on the options)\n");
 +    else if (!count)
 +        printf("        none (sink filter)\n");
  
      if (f->priv_class)
 -        show_help_children(f->priv_class, AV_OPT_FLAG_VIDEO_PARAM |
 +        show_help_children(f->priv_class, AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM |
                                            AV_OPT_FLAG_AUDIO_PARAM);
 +#else
 +    av_log(NULL, AV_LOG_ERROR, "Build without libavfilter; "
 +           "can not to satisfy request\n");
 +#endif
  }
+ #endif
  
  int show_help(void *optctx, const char *opt, const char *arg)
  {
@@@ -212,11 -208,15 +212,16 @@@ static int flv_write_header(AVFormatCon
              } else {
                  framerate = 1 / av_q2d(s->streams[i]->codec->time_base);
              }
+             if (video_enc) {
+                 av_log(s, AV_LOG_ERROR,
+                        "at most one video stream is supported in flv\n");
+                 return AVERROR(EINVAL);
+             }
              video_enc = enc;
              if (enc->codec_tag == 0) {
 -                av_log(s, AV_LOG_ERROR, "video codec not compatible with flv\n");
 -                return -1;
 +                av_log(s, AV_LOG_ERROR, "Video codec '%s' for stream %d is not compatible with FLV\n",
 +                       avcodec_get_name(enc->codec_id), i);
 +                return AVERROR(EINVAL);
              }
              break;
          case AVMEDIA_TYPE_AUDIO: