Hello,
there is an error in provided media controller examples
struct media_entity_desc entity[10];
...
/* 4.enumerate media-entities */
printf("4.enumerating media entities\n");
index = 0;
do {
memset(&entity[index], 0, sizeof(entity));
...
index++;
} while ...
This code can rewrite uninitialized memory. The solution is to do the memset before the cycle on whole entity array. It affects all files in mc subdirectory and it is also on the wiki.
Anyway, the quality of all code in examples is really poor, IMHO.
best regards
Jan