Commit d192ff0e authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial…

avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial format extensions being enabled.
Found-by: 's avatarJean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 74760883)
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 4d1346d4
...@@ -222,6 +222,18 @@ static int flv_write_header(AVFormatContext *s) ...@@ -222,6 +222,18 @@ static int flv_write_header(AVFormatContext *s)
avcodec_get_name(enc->codec_id), i); avcodec_get_name(enc->codec_id), i);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
if (enc->codec_id == AV_CODEC_ID_MPEG4 ||
enc->codec_id == AV_CODEC_ID_H263) {
int error = enc->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL;
av_log(s, error ? AV_LOG_ERROR : AV_LOG_WARNING,
"Codec %s is not supported in the official FLV specification,\n", avcodec_get_name(enc->codec_id));
if (error) {
av_log(s, AV_LOG_ERROR,
"use vstrict=-1 / -strict -1 to use it anyway.\n");
return AVERROR(EINVAL);
}
}
break; break;
case AVMEDIA_TYPE_AUDIO: case AVMEDIA_TYPE_AUDIO:
if (audio_enc) { if (audio_enc) {
......
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