avutil/opt: add missing case for AV_OPT_TYPE_CHLAYOUT in av_opt_free()

Fixes potential memleaks for existing options of this type.

Signed-off-by: James Almer <jamrial@gmail.com>
release/5.1
James Almer 3 years ago
parent 710e51677a
commit 327efa6633
  1. 4
      libavutil/opt.c

@ -1729,6 +1729,10 @@ void av_opt_free(void *obj)
av_dict_free((AVDictionary **)(((uint8_t *)obj) + o->offset));
break;
case AV_OPT_TYPE_CHLAYOUT:
av_channel_layout_uninit((AVChannelLayout *)(((uint8_t *)obj) + o->offset));
break;
default:
break;
}

Loading…
Cancel
Save