You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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>
This commit is contained in:
committed by
Michael Niedermayer
parent
732c3ebffa
commit
e8565d21c2
@@ -537,7 +537,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
avio_w8(pb, FLV_TAG_TYPE_VIDEO);
|
avio_w8(pb, FLV_TAG_TYPE_VIDEO);
|
||||||
|
|
||||||
flags = enc->codec_tag;
|
flags = enc->codec_tag;
|
||||||
if (flags == 0) {
|
if (flags <= 0 || flags > 15) {
|
||||||
av_log(s, AV_LOG_ERROR,
|
av_log(s, AV_LOG_ERROR,
|
||||||
"Video codec '%s' is not compatible with FLV\n",
|
"Video codec '%s' is not compatible with FLV\n",
|
||||||
avcodec_get_name(enc->codec_id));
|
avcodec_get_name(enc->codec_id));
|
||||||
|
Reference in New Issue
Block a user