OSDN Git Service

handle_packets takes number of packets as arg, avoid reading too much
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 18 Oct 2009 20:11:32 +0000 (20:11 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 18 Oct 2009 20:11:32 +0000 (20:11 +0000)
Originally committed as revision 20288 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mpegts.c

index 300eb71..8a88801 100644 (file)
@@ -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;