Closed aegroto closed 2 years ago
I can see there is a function for that
But this is a static function, which is not exposed. Rsmpeg only wraps public functions in header files.
The reconfig_encoder
in libx264 only resets the priv_data
member, if you do want to do the same thing, use unsafe Rust to access the priv_data
member of AVCodecContext
should be ok.
Thanks. In the end I figured out that recreating the context each time is not a huge cost and it seems working, even if it's a bit harsh.
Is there any way to reconfigure a context after it has been initialized and used? I can see there is a function for that, at least on x264 https://ffmpeg.org/doxygen/4.0/libx264_8c_source.html#l00171 but I think that both the library and the FFI are not exposing it.