Add CAFFE2_API to video decoding functions (#31187)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/31132
Also closes old issue https://github.com/pytorch/pytorch/issues/11735
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31187
Differential Revision: D19147172
Pulled By: pbelevich
fbshipit-source-id: e959058eec3489061f431fbecc99ded0d4dc1704