Commit 0ea97a1c authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents c1fe41ed 7f1fd976
......@@ -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);
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment