avformat/mpegts: fix iteration count in add_pid_to_pmt()

Fixes accessing uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-11-04 19:31:59 +01:00
parent 09024fe681
commit 786594184a

View file

@ -306,7 +306,7 @@ static void add_pid_to_pmt(MpegTSContext *ts, unsigned int programid,
if (p->nb_pids >= MAX_PIDS_PER_PROGRAM)
return;
for (i = 0; i < MAX_PIDS_PER_PROGRAM; i++)
for (i = 0; i < p->nb_pids; i++)
if (p->pids[i] == pid)
return;