summaryrefslogtreecommitdiff
path: root/libavcodec/options.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-16 20:41:42 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-20 02:45:17 +0100
commit784c3c0d8552365431e19748aa32bf7bcacd1464 (patch)
treebcb5d923d362da7ce8d2d97864d37aaeb53f6888 /libavcodec/options.c
parent77616c5fb4ee6e1223c1c4d30cc76412a9e7e9d0 (diff)
downloadffmpeg-784c3c0d8552365431e19748aa32bf7bcacd1464.tar.gz
avcodec/options: Remove always-true check
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 <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r--libavcodec/options.c2
1 files changed, 0 insertions, 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);