diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index a362e29e8b..93b5f40d5f 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -78,7 +78,7 @@ static int mpegps_probe(AVProbeData *p) for(i=0; ibuf_size; i++){ code = (code<<8) + p->buf[i]; if ((code & 0xffffff00) == 0x100) { - int pes= check_pes(p->buf+i, p->buf+i+p->buf_size); + int pes= check_pes(p->buf+i, p->buf+p->buf_size); if(code == SYSTEM_HEADER_START_CODE) sys++; else if(code == PRIVATE_STREAM_1) priv1++;