In this function, fps_n and fps_d are both set to 0 for h264 decoder. Then in wg_format_to_caps_video(), framerate is stripped only when fps_n and fps_d are both 0.
It works fine so far, at least before introducing WMV deocder. However, according to my tests, in WMV decoder, when it tries to match element caps, it requires caps to hold framerate field, otherwise, the element connecting will fail.
In what way? I tried applying this series without patch 2/4, and it mostly succeeds with the attached diff instead [1].
[1] [scratch.diff](/uploads/2c2953cd13f69a29780d4510be0aaf96/scratch.diff)