h264parse: can not get the correct resolution in src caps for multi-resolution streams
I am tring to decode a multi-resolution stream by gstreamer pipeline. But when the resolution changed during decoding, the decoder can NOT get the new width and height in src caps. I checked the function of gst_h264_parse_update_src_caps in gsth264parse.c, I found below code:
2165 if (s && gst_structure_has_field (s, "width"))
2166 gst_structure_get_int (s, "width", &width);
2167 else
2168 width = h264parse->width;
2169
2170 if (s && gst_structure_has_field (s, "height"))
2171 gst_structure_get_int (s, "height", &height);
2172 else
2173 height = h264parse->height;```
The width and height in src caps are overrided by upstream caps instread of using the values in SPS, that's the reason why
decoder can not get the updated width and height. I have no idea why don't you directly use the crop_width and crop_height in SPS?
BTW, I am using the version of GStreamer 1.20.1
the OS is aarch64 GNU/Linux