- g_datalist_set_data(&pd_ann_visible, pd_name, pd_name);
- }
-
- /* Any keys left in the options hash are probes, where the key
- * is the probe name as specified in the decoder class, and the
- * value is the probe number i.e. the order in which the PD's
- * incoming samples are arranged. */
- if (srd_instance_set_probes(di, pd) != SRD_OK)
- return 1;
+ if (!(di = srd_inst_new(pd_name, pd_opthash))) {
+ fprintf(stderr, "Failed to instantiate protocol decoder %s\n", pd_name);
+ goto err_out;
+ }
+ g_datalist_set_data(&pd_ann_visible, di->inst_id, pd_name);