[FFmpeg-cvslog] avformat/mpegts: use MAX_SECTION_SIZE instead of hardcoded value
Aman Gupta
git at videolan.org
Sat May 19 05:18:22 EEST 2018
ffmpeg | branch: release/4.0 | Aman Gupta <aman at tmm1.net> | Wed May 9 12:42:14 2018 -0700| [ef28571efe234453133f12c00e5d32300518cfe8] | committer: Aman Gupta
avformat/mpegts: use MAX_SECTION_SIZE instead of hardcoded value
Signed-off-by: Aman Gupta <aman at tmm1.net>
(cherry picked from commit 1a14e39145816597b97db46dbb30e37feddf246c)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef28571efe234453133f12c00e5d32300518cfe8
---
libavformat/mpegts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index cfdd03125b..c6a0228253 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -401,7 +401,7 @@ static void write_section_data(MpegTSContext *ts, MpegTSFilter *tss1,
} else {
if (tss->end_of_section_reached)
return;
- len = 4096 - tss->section_index;
+ len = MAX_SECTION_SIZE - tss->section_index;
if (buf_size < len)
len = buf_size;
memcpy(tss->section_buf + tss->section_index, buf, len);
@@ -411,7 +411,7 @@ static void write_section_data(MpegTSContext *ts, MpegTSFilter *tss1,
/* compute section length if possible */
if (tss->section_h_size == -1 && tss->section_index >= 3) {
len = (AV_RB16(tss->section_buf + 1) & 0xfff) + 3;
- if (len > 4096)
+ if (len > MAX_SECTION_SIZE)
return;
tss->section_h_size = len;
}
More information about the ffmpeg-cvslog
mailing list