On Tue Mar 7 01:29:07 2023 +0000, Zebediah Figura wrote:
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)
Alright, it's my fault. It seems that it is related to stream change notify. I ignore it before, so I regard it as a failure. I'll submit a new version which handles stream change.
But we still need to set the correct fps in wg_format_to_caps_video() if AvgTimePerFrame is not 0. TimeLength test failed with the attached diff becuase we doesn't set fps.