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:
@@ -1635,6 +1635,7 @@ static void show_help_muxer(const char *name)
|
|||||||
show_help_children(fmt->priv_class, AV_OPT_FLAG_ENCODING_PARAM);
|
show_help_children(fmt->priv_class, AV_OPT_FLAG_ENCODING_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_AVFILTER
|
||||||
static void show_help_filter(const char *name)
|
static void show_help_filter(const char *name)
|
||||||
{
|
{
|
||||||
#if CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
@@ -1682,6 +1683,7 @@ static void show_help_filter(const char *name)
|
|||||||
"can not to satisfy request\n");
|
"can not to satisfy request\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int show_help(void *optctx, const char *opt, const char *arg)
|
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);
|
show_help_demuxer(par);
|
||||||
} else if (!strcmp(topic, "muxer")) {
|
} else if (!strcmp(topic, "muxer")) {
|
||||||
show_help_muxer(par);
|
show_help_muxer(par);
|
||||||
|
#if CONFIG_AVFILTER
|
||||||
} else if (!strcmp(topic, "filter")) {
|
} else if (!strcmp(topic, "filter")) {
|
||||||
show_help_filter(par);
|
show_help_filter(par);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
show_help_default(topic, par);
|
show_help_default(topic, par);
|
||||||
}
|
}
|
||||||
|
@@ -212,6 +212,11 @@ static int flv_write_header(AVFormatContext *s)
|
|||||||
} else {
|
} else {
|
||||||
framerate = 1 / av_q2d(s->streams[i]->codec->time_base);
|
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;
|
video_enc = enc;
|
||||||
if (enc->codec_tag == 0) {
|
if (enc->codec_tag == 0) {
|
||||||
av_log(s, AV_LOG_ERROR, "Video codec '%s' for stream %d is not compatible with FLV\n",
|
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;
|
break;
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
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;
|
audio_enc = enc;
|
||||||
if (get_audio_flags(s, enc) < 0)
|
if (get_audio_flags(s, enc) < 0)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
Reference in New Issue
Block a user