aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-16 23:23:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-16 23:23:16 +0200
commit0ea97a1c5b4510d276db105a1bb1766ef535e488 (patch)
treef4c43afb1778b72de565d1815a40e6fa88bc1aa7
parentc1fe41ed472e66e6198bbdaf4faf6fa10f7b79c4 (diff)
parent7f1fd9763668c5863e743d108f501a00d1806da0 (diff)
downloadandroid_external_ffmpeg-0ea97a1c5b4510d276db105a1bb1766ef535e488.tar.gz
android_external_ffmpeg-0ea97a1c5b4510d276db105a1bb1766ef535e488.tar.bz2
android_external_ffmpeg-0ea97a1c5b4510d276db105a1bb1766ef535e488.zip
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>
-rw-r--r--cmdutils.c4
-rw-r--r--libavformat/flvenc.c10
2 files changed, 14 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 4b625fd2d1..2b5ba3355a 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1635,6 +1635,7 @@ static void show_help_muxer(const char *name)
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
@@ -1682,6 +1683,7 @@ static void show_help_filter(const char *name)
"can not to satisfy request\n");
#endif
}
+#endif
int show_help(void *optctx, const char *opt, const char *arg)
{
@@ -1703,8 +1705,10 @@ int show_help(void *optctx, const char *opt, const char *arg)
show_help_demuxer(par);
} else if (!strcmp(topic, "muxer")) {
show_help_muxer(par);
+#if CONFIG_AVFILTER
} else if (!strcmp(topic, "filter")) {
show_help_filter(par);
+#endif
} else {
show_help_default(topic, par);
}
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index b35c4cf955..b0f8a413a6 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -212,6 +212,11 @@ static int flv_write_header(AVFormatContext *s)
} 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 '%s' for stream %d is not compatible with FLV\n",
@@ -220,6 +225,11 @@ static int flv_write_header(AVFormatContext *s)
}
break;
case AVMEDIA_TYPE_AUDIO:
+ if (audio_enc) {
+ av_log(s, AV_LOG_ERROR,
+ "at most one audio stream is supported in flv\n");
+ return AVERROR(EINVAL);
+ }
audio_enc = enc;
if (get_audio_flags(s, enc) < 0)
return AVERROR_INVALIDDATA;