diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-17 01:23:11 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-17 01:23:16 +0400 |
commit | 0ea97a1c5b4510d276db105a1bb1766ef535e488 (patch) | |
tree | f4c43afb1778b72de565d1815a40e6fa88bc1aa7 /libavformat/flvenc.c | |
parent | c1fe41ed472e66e6198bbdaf4faf6fa10f7b79c4 (diff) | |
parent | 7f1fd9763668c5863e743d108f501a00d1806da0 (diff) |
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>
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r-- | libavformat/flvenc.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; |