Simplify HW encoder object handling (#3138)
Summary: hw_device_ctx and hw_frame_ctx assigned to an AVCodecContext object are owned by libavformat, and get freed in [av_codec_free](https://ffmpeg.org/doxygen/4.1/group__lavc__core.html#gaf869d0829ed607cec3a4a02a1c7026b3) (actually in [avcodec_close](https://ffmpeg.org/doxygen/4.1/libavcodec_2utils_8c_source.html#l01069)), so we do not need to keep the reference around. Pull Request resolved: https://github.com/pytorch/audio/pull/3138 Reviewed By: nateanl Differential Revision: D43738009 Pulled By: mthrok fbshipit-source-id: 8c1f4217fa7b21dce872d12be9245056f3fc7537
Showing
Please register or sign in to comment