Since you didn't go fully the way i proposed (ie only adding the program's streams to m_streams, not all). This need a check that the idx is in range of m_stream.

I would still prefer that you only add the program stream's to the structure just like it was before.