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>
This commit is contained in:
Michael Niedermayer 2013-04-16 23:23:11 +02:00
commit 0ea97a1c5b
2 changed files with 14 additions and 0 deletions

View File

@ -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);
}

View File

@ -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;