I think I've discovered the image type handling bug. Since you're modifying the code in question, I'll just note it here rather than creating a conflicting MP.
The following code:
auto caps = gst_sample_get_caps(sample);
auto structure = gst_caps_get_structure(caps, 0);
Needs to be changed to:
auto structure = gst_sample_get_info(sample);
It seems the sample code I based this on was doing it wrong.
I think I've discovered the image type handling bug. Since you're modifying the code in question, I'll just note it here rather than creating a conflicting MP.
The following code:
auto caps = gst_sample_ get_caps( sample) ; get_structure( caps, 0);
auto structure = gst_caps_
Needs to be changed to:
auto structure = gst_sample_ get_info( sample) ;
It seems the sample code I based this on was doing it wrong.