diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 300eb71a73..8a88801287 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1377,7 +1377,7 @@ static int mpegts_read_header(AVFormatContext *s, mpegts_open_section_filter(ts, PAT_PID, pat_cb, ts, 1); - handle_packets(ts, s->probesize); + handle_packets(ts, s->probesize / ts->raw_packet_size); /* if could not find service, enable auto_guess */ ts->auto_guess = 1;