av_free(ts->pids[i]);
if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]);
static int mpegts_read_close(AVFormatContext *s){    MpegTSContext *ts = s->priv_data;    int i;    for(i=0;i<NB_PID_MAX;i++)        av_free(ts->pids[i]);    return 0;}