]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/bsf: Don't set defaults for AVClass without options
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 17 Mar 2020 21:31:46 +0000 (22:31 +0100)
committerJames Almer <jamrial@gmail.com>
Sat, 21 Mar 2020 21:52:10 +0000 (18:52 -0300)
This happened for AVBSFContext.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/bsf.c

index 9dbf6a636d746e6f5dcf75608af1d9a5bc2018f7..d0e0d46068e73ba76006d8e9f76f90e8a89bdb78 100644 (file)
@@ -45,8 +45,6 @@ void av_bsf_free(AVBSFContext **pctx)
     if (ctx->filter->priv_class && ctx->priv_data)
         av_opt_free(ctx->priv_data);
 
-    av_opt_free(ctx);
-
     if (ctx->internal)
         av_packet_free(&ctx->internal->buffer_pkt);
     av_freep(&ctx->internal);
@@ -112,8 +110,6 @@ int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **pctx)
         goto fail;
     }
 
-    av_opt_set_defaults(ctx);
-
     /* allocate priv data and init private options */
     if (filter->priv_data_size) {
         ctx->priv_data = av_mallocz(filter->priv_data_size);