diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-02-28 20:58:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 01:52:51 +0100 |
commit | e6bc1fe10c56d7f9712679a31cb9a79457556b1c (patch) | |
tree | 131547bd9e9b3482f0f679235bf09dda51ac0a52 | |
parent | e6b18f5700f447ba16857ca707f0400a094333cb (diff) | |
download | ffmpeg-e6bc1fe10c56d7f9712679a31cb9a79457556b1c.tar.gz |
avformat/flvenc: check that the codec_tag fits in the available bits
flags is later written with avio_w8 and if it doesn't fit in one byte it
triggers an av_assert2.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e8565d21c276ab9ac5ce785549420321fbd0b093)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/flvenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 5468c4d0e9..009f97558f 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -521,7 +521,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) avio_w8(pb, FLV_TAG_TYPE_VIDEO); flags = enc->codec_tag; - if (flags == 0) { + if (flags <= 0 || flags > 15) { av_log(s, AV_LOG_ERROR, "Video codec '%s' is not compatible with FLV\n", avcodec_get_name(enc->codec_id)); |