Commit b0d0d7e4 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

avformat/flvenc: Fix leak of oversized packets

Might happen for annex B H.264.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 28d02524
......@@ -992,7 +992,8 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
if (size + flags_size >= 1<<24) {
av_log(s, AV_LOG_ERROR, "Too large packet with size %u >= %u\n",
size + flags_size, 1<<24);
return AVERROR(EINVAL);
ret = AVERROR(EINVAL);
goto fail;
}
avio_wb24(pb, size + flags_size);
......
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