Update the logic to fetch pixel format from filter graph (#3479)
Summary: When using GPU decoder in some environments, attempting to read the output formats from filter graph caused an issue in which the software pixel format cannot be determined. We do not know the exact cause but when it happens, the input link of buffer sink does not have HW frames context. Since currently no filter can convert the pixel format of CUDA frame, we resort to the HW frames context of the output link of buffer source. Environments this was observed. Env1 - OS: Fedora 36 (x86_64) - GCC 12.2.1 - Python 3.10.12 - GPU: GeForce RTX 3070 Ti Laptop GPU - FFmpeg: 5.1.3 - nv-codec-header: n11.1.5.2 - CUDA: 12.1 Env2 - Ubuntu 20.04.4 LTS (x86_64) - GCC 9.4.0 - Python 3.11.3 - GPU: Quadro GV100 - FFmpeg: 5.1.3 - nv-codec-header: n11.1.5.2 - CUDA: 11.4 Pull Request resolved: https://github.com/pytorch/audio/pull/3479 Differential Revision: D47482407 Pulled By: mthrok fbshipit-source-id: 1c53096b27824453b260138ab64e1948afeeefc7
Showing
Please register or sign in to comment