[FFmpeg-devel] [PATCH 5/7] fftools/ffmpeg_demux: Don't use fake object with av_opt_eval
Anton Khirnov
anton at khirnov.net
Tue Oct 10 14:48:17 EEST 2023
Quoting Andreas Rheinhardt (2023-10-07 02:40:29)
> The av_opt_eval family of functions emits errors messages on error
> and can therefore not be used with fake objects when the AVClass
> has a custom item_name callback. The AVClass for AVCodecContext
> has such a custom callback (it searches whether an AVCodec is set
> to use its name). In practice it means that whatever is directly
> after the "cc" pointer to the AVClass for AVCodec in the stack frame
> of ist_add() will be treated as a pointer to an AVCodec with
> unpredictable consequences.
>
> Fix this by using an actual AVCodecContext instead of a fake object.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> fftools/ffmpeg_demux.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
Ok
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list