Browse code

Merge remote-tracking branch 'qatar/master'

* 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>

Michael Niedermayer authored on 2013/04/17 06:23:11
Showing 2 changed files
... ...
@@ -1635,6 +1635,7 @@ static void show_help_muxer(const char *name)
1635 1635
         show_help_children(fmt->priv_class, AV_OPT_FLAG_ENCODING_PARAM);
1636 1636
 }
1637 1637
 
1638
+#if CONFIG_AVFILTER
1638 1639
 static void show_help_filter(const char *name)
1639 1640
 {
1640 1641
 #if CONFIG_AVFILTER
... ...
@@ -1682,6 +1683,7 @@ static void show_help_filter(const char *name)
1682 1682
            "can not to satisfy request\n");
1683 1683
 #endif
1684 1684
 }
1685
+#endif
1685 1686
 
1686 1687
 int show_help(void *optctx, const char *opt, const char *arg)
1687 1688
 {
... ...
@@ -1703,8 +1705,10 @@ int show_help(void *optctx, const char *opt, const char *arg)
1703 1703
         show_help_demuxer(par);
1704 1704
     } else if (!strcmp(topic, "muxer")) {
1705 1705
         show_help_muxer(par);
1706
+#if CONFIG_AVFILTER
1706 1707
     } else if (!strcmp(topic, "filter")) {
1707 1708
         show_help_filter(par);
1709
+#endif
1708 1710
     } else {
1709 1711
         show_help_default(topic, par);
1710 1712
     }
... ...
@@ -212,6 +212,11 @@ static int flv_write_header(AVFormatContext *s)
212 212
             } else {
213 213
                 framerate = 1 / av_q2d(s->streams[i]->codec->time_base);
214 214
             }
215
+            if (video_enc) {
216
+                av_log(s, AV_LOG_ERROR,
217
+                       "at most one video stream is supported in flv\n");
218
+                return AVERROR(EINVAL);
219
+            }
215 220
             video_enc = enc;
216 221
             if (enc->codec_tag == 0) {
217 222
                 av_log(s, AV_LOG_ERROR, "Video codec '%s' for stream %d is not compatible with FLV\n",
... ...
@@ -220,6 +225,11 @@ static int flv_write_header(AVFormatContext *s)
220 220
             }
221 221
             break;
222 222
         case AVMEDIA_TYPE_AUDIO:
223
+            if (audio_enc) {
224
+                av_log(s, AV_LOG_ERROR,
225
+                       "at most one audio stream is supported in flv\n");
226
+                return AVERROR(EINVAL);
227
+            }
223 228
             audio_enc = enc;
224 229
             if (get_audio_flags(s, enc) < 0)
225 230
                 return AVERROR_INVALIDDATA;