Browse Source

avformat/flvenc: Fix leak of oversized packets

Might happen for annex B H.264.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3
Andreas Rheinhardt Michael Niedermayer 5 years ago
parent
commit
b0d0d7e4d0
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/flvenc.c

+ 2
- 1
libavformat/flvenc.c View File

@@ -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);


Loading…
Cancel
Save