diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index e6c353df0e..460372c116 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1822,7 +1822,7 @@ static int read_packet(AVFormatContext *s, uint8_t *buf, int raw_packet_size) static int handle_packets(MpegTSContext *ts, int nb_packets) { AVFormatContext *s = ts->stream; - uint8_t packet[TS_PACKET_SIZE]; + uint8_t packet[TS_PACKET_SIZE + FF_INPUT_BUFFER_PADDING_SIZE]; int packet_num, ret = 0; if (avio_tell(s->pb) != ts->last_pos) {