+ // we use the low 16 bits of iter as the value to be passed to
+ // av_(de)muxer_iterate()
+ void *val = (void*)(((uintptr_t)*iter) & ((1 << ITER_STATE_SHIFT) - 1));
+ unsigned int state = ((uintptr_t)*iter) >> ITER_STATE_SHIFT;
+ const AVClass *ret = NULL;
+
+ if (state == CHILD_CLASS_ITER_AVIO) {
+ ret = &ff_avio_class;
+ state++;
+ goto finish;
+ }