Commit 78659418 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpegts: fix iteration count in add_pid_to_pmt()

Fixes accessing uninitialized memory
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 09024fe6
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment