Added in dc51a72ba45fbefb9f1c6c3ca5a5b2388d69b2da, yet even back then the check was always true as the AVCodecContext has already been memset to zero before that.
Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/options.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/options.c b/libavcodec/options.c index 61689b48d9..53f13dab37 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -140,12 +140,10 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec) s->reordered_opaque = AV_NOPTS_VALUE; if(codec && codec->priv_data_size){ - if(!s->priv_data){ s->priv_data= av_mallocz(codec->priv_data_size); if (!s->priv_data) { return AVERROR(ENOMEM); } - } if(codec->priv_class){ *(const AVClass**)s->priv_data = codec->priv_class; av_opt_set_defaults(s->priv_data); -- 2.27.0 _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
